on 09-18-2013 3:03 PM
First I'm new to SCN.SAP and I hope that I'm posting at the proper place for this
question. If not please reply to me where I should ask the following question.
I have a picture object in a datawindow, when I click on the object
the clicked event argument dwo.name return 'datawindow' and should
be returning in this case 'p_next' the name of the picture object.
Anyone has an idea on what is causing or could cause this problem...
TIA
Sylvain
Try to use GetObjectAtPointer() function to check which object was clicked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank for your reply,
I have already tried changing picture control for a button, and I just tried
what you mention using GetObjectAtPointer() and both do not work.
But I just realize what seem to be the problem, I'm using 'rows_per_detail=2' property
in the DW, and it look like when the value is 1 everything work fine, but the
moment that value is 2 or more the images at the beginning and the end of the
row return 'datawindow' for the name ...
Is this the way it is suppose to work when we use 'rows_per_detail=2-n' we loose some
functionality in the DW?
Thank you again for your help
Sylvain
Hi Robert,
The DW is part of a Point Of Sale where the user can select product to be sold by clicking on the product they want to sell. Most of those PC will have a touch screen, the scroll bar in those case is to small to be easily use, so we simply put a previous and next button at the beginning and the end of the first visible row. When the user touch the product 'button' it works fine, it is only the previous and next image 'button' that give me problem and only when the 'rows_per_detail=2' or more.
I have uploaded 2 DW source it is actually the same DW but one where 'rows_per_detail=1' and the other where 'rows_per_detail=2'
I think the problem is in the visible expression you have on your picture columns (p_previous and p_next). The picture column is not visible.
Clicking on the first row, I get the the following:
The expression evaluates to false, so the column is invisible. Both the p_previous and p_next columns. So, that's where your problem is.
Hi Neil,
the reason why you do not see is probably because the variable/compute
field 'cpu_blr_v ' in the DW is not equal to 1, that compute is set on entry
of the POS command according with what the user wanted in a configuration
table that they have control over, if the user want scrollbar we do not show
the button and also button will be visible only if getRow() is equal to the
compute value of 'cpu_first_row'
those button will display dynamically according to the following
the user do not want scrollbar
AND not all rows can be display/fit in the DW view area
AND they will display only on the first row of that same view area
and believe me the visible is true, I can clearly see those button on screen
and like I said previously it do not work only when 'rows_per_detail' is set to 2 or more
Thank you for your help
Sylvain
Hi Sylvain,
Exactly. As you could see on the screenshot, the cpu_blr_v is equal to 1. The compute expression is just a plain number 1. The same with cpu_first_row. The problem is, the picture columns as they are not regular columns and not part of the N-UP columns. The row number of the picture columns is the row number of the last row in that row. Hmmm, sounds confusing? Let me illustrate a bit:
p_prev 1 2 p_next
p_prev 3 4 p_next
p_prev 5 6 p_next
p_prev 7 p_next
That is the row numbering of N-UP with rows_per_detail = 2. In the first "row" that you can see, the row number of p_prev and p_next is 2. The second "row" they have row number of 4, the next one they have row number of 6 and the last one, they have a row number of 7.
I'm not sure why the button is visible on screen on your end, but believe me, the condition is false. It is only true, when you insert only 1 row.
Cheers,
Neil
Thank you Neil for your answer,
you were right the button visible property was turn off
even if the image of the button was still visible on screen
(not to sure why)...
it was the job of the command to set the value of 'cpu_first_row'
dynamically but it was not done properly by the program.
so again thank you for your help.
Sylvain
Create a button object on the datawindow and assign the picture to that. Then put the code in the buttonclicked event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sylvain:
If the picture button is not enabled or you click anywhere out side its borders "datawindow" will be returned.
I tested on latest version.
Cheers...Bob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sylvain;
That should work. Are you sure that the picture object "enabled" property inside the DWO is set to true?
Regards ... Chris
Note: PB 8.x is very old and running this on new O/S's might be the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.