10-12-2010 1:51 PM
Hi,
in a screen of my program i have a pushbutton, and i would like to change dynamically the text and icon of it.
Actually, the name of my pushbutton is BTN_VALID, in the PBO i do this :
CONCATENATE c_icon_invalid text-035 INTO btn_valid SEPARATED BY space.
It's not work
Thanks for your help.
10-12-2010 3:19 PM
The important thing you must do is you must mark the check output only in the screen attributes.
Check this demonstration by Rich
10-12-2010 2:15 PM
Use FM ICON_CREATE
DATA g_button_str TYPE icons-text.
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = 'ICON_DISPLAY_MORE'
text = 'some_text'
info = 'some_text'
IMPORTING
RESULT = g_button_str.
"now assign to button PA_BUTT
pa_butt = g_button_str.
Regards
Marcin
10-12-2010 2:22 PM
Hi,
Have you set the Output field attribute for a pushbutton in screen painter ? If it is set then your code of dynamically changing the text should work please check this.
And for icons you can give the icon code in the text.
Reagrds,
Pawan
10-12-2010 3:19 PM
The important thing you must do is you must mark the check output only in the screen attributes.
Check this demonstration by Rich
10-13-2010 9:26 AM