‎2008 Jun 16 10:00 AM
Hi All,
How can I position the push buttons dynamically in the module pool.
Suppose I have 4 push buttons within in a box on the screen. For particular condition I want third push button to disappear and the 4th Push button should be moved to the place of third push button and also the size of the box should be adjusted based on the number of buttons in the box.
Points will be rewarded for the same.
Regards,
Kishore.
‎2008 Jun 16 10:13 AM
Hi,
the elements can not be placed dynamically what i think so.
But you can do one thing.
suppose you have place 4 pushbutton on screen. say Button1,Button2,Button3,Button4.
In your screen PBO you can write a module.
in which depending on the condition you can hide and display button.
for e.g.
if flag = 'X'.
loop at screen.
if screen-name = 'BUTTON1' .
screen-active = '0'.
else.
screen-active = '1'.
endif.
mdify screen.
endloop.
endif.
By this piece of code you can hide or display the button accordingly.and the box will automatically change its size .
I hope this will help you out.
‎2008 Jun 16 10:19 AM
Hi,
We can enable / disable the buttons in PBO of the screen. But i don't think we can resixe the button. code for enable / disable the buttons is
LOOP AT SCREEN.
CASE screen-name.
WHEN 'BUTTON3'.
screen-active = 0.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
Regards,
Siva.
‎2008 Jun 16 10:21 AM
hi
there is structure by name 'FELD' where there all attributes that can fully define
your button. but i don't know how to use it.
i think, it is easy to hide 4-th button than hide 3-rd button and move 4-th button on place of 3-rd button. if you will make, as i said, in program you will only analyze whether 4-th button is hidden or not.
‎2008 Jun 16 11:57 AM
You can use subscreens to do what you want.
For example subscreen 1 holds 1 button, subscreen 2 holds 2 buttons. Depending on the setting of your ok_code, display either subscreen 1 or 2.