Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Positioning the screen fields Dynamically in a Module Pool.

Former Member
0 Likes
1,925

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.

4 REPLIES 4
Read only

Former Member
0 Likes
906

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.

Read only

sivasatyaprasad_yerra
Product and Topic Expert
Product and Topic Expert
0 Likes
906

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.

Read only

Former Member
0 Likes
906

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.

Read only

christine_evans
Active Contributor
0 Likes
906

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.