I have a program that opens a dropdown box containing a number of items. The program contains the following code:
[color=blue:8ca4812a53] CHARACTER*50 ArrayOfItemDescrps(14) COMMON IFileSel EXTERNAL TopAssyCallbk
i=winio@('%^`ls&',ArrayOfItemDescrps,14,IFileSel,TopAssyCallbk)
[/color:8ca4812a53]
When the user picks an item from the dropdown box, its number in the box is loaded into IFileSel, and the callback function TopAssyCallbk() is called.
If the user has picked the first item in the dropdown box, I would like the callback function to open the FILE_OPENR dialog box. If the user has picked any other item, the callback function should not open the FILE_OPENR dialog box.
The TopAssyCallbk() function has the following code:
[color=blue:8ca4812a53] COMMON IFileSel
if(IFileSel.NE.1) goto 99
i=winio@('%ca[&Select User Parts List]&')
i=winio@('%mn[&File[&Open]]','FILE_OPENR',BOMFileNm,GetFileFn)
i=winio@('%mn[[E&xit]]','EXIT')
99 continue [/color:8ca4812a53]
This works after a fashion. But the problem is, when the user picks the first item in the dropdown box, the program first presents a very small dialog box with on one menu item, File; and that menu item has one sub-menu item, Open. If the user then clicks on File, and then on Open, the FILE_OPENR dialog box then opens. That's two extra clicks I'd rather the user didn't have to bother with.
Is there a way I can open the FILE_OPENR dialog box as soon as the user picks the first item in the dropdown box? I'd like to put code something like this, in the callback function TopAssyCallbk():
[color=blue:8ca4812a53] COMMON IFileSel
if(IFileSel.NE.1) goto 99
i=Just_Open_The_FILE_OPENR_Dialog_Box_Already
99 continue [/color:8ca4812a53]
In a way, I guess I'd like to call the FILE_OPENR function directly, as an ordinary function instead of a callback function.
Can this be done?
If not, is there any way I can get this program to call the callback function FILE_OPENR conditionally, based on which dropdown box item the user picks, without having to open that tiny box with the File/Open menu item first?
Thanks all!