I made a test script to get a listbox that enumerates the bitmaps stored in the adb file and displays the bitmap and its name in the list. So far so good.
Now I want to put it in another xdialog where the other listboxes are formatted with different directives. I also want the listbox(s) to be stretchable. But when I add the conditions for the display it screws up the whole dialog and looks ridiculous. There must be some magic that one needs to know about how to put these different command lines together. Below is my test script followed by the UDF in progress that you can import & which anyone should be able to use since these display control panel elements.
This one you can just copy to the IW, select all and run:
(Edit: removed the bad example)
Now I want to put it in another xdialog where the other listboxes are formatted with different directives. I also want the listbox(s) to be stretchable. But when I add the conditions for the display it screws up the whole dialog and looks ridiculous. There must be some magic that one needs to know about how to put these different command lines together. Below is my test script followed by the UDF in progress that you can import & which anyone should be able to use since these display control panel elements.
This one you can just copy to the IW, select all and run:
Code:
dim imgs as c DIM imglist as C DIM SHARED vResult as C dim dlgbody as c dim dlgcode as c dim dlgtitle as c = "Image Viewer" '--------------------------- imglist = a5.bitmap_enum(2) imglist = sortsubstr(imglist,crlf()) imglist = *for_each(foo,ut(FOO.VALUE),imglist) '--------------------------- ok_button_label = "&OK" cancel_button_label = "&Cancel" dlgbody = <<%dlg% {removecomments} {can_exit=Cancel} {units=6} {xmargin=2,0} {region} Addin Images:; {stretch=height,width} [%d;O={I=:@1}{T=.5}{@1}%.40,20imgs^#imglist]; {endregion}; {stretch=} Image: [.30imgs];; {line=1,0};; {region} {justify=center} <*12=ok_button_label!OK> <12=cancel_button_label!CANCEL> {endregion}; %dlg% dlgcode = <<%code% if a_dlg_button = "CANCEL" then ui_modeless_dlg_close(dlgtitle) end if if a_dlg_button ="cximg" then 'do something with the image selected end if if a_dlg_button = "OK" then clipboard.Set_Data(imgs) ui_modeless_dlg_close(dlgtitle) end if %code% vResult = ui_modeless_dlg_box(dlgtitle,dlgbody,dlgcode)
Comment