Another design problem.
I want to have a menu that I can use from anywhere that contains all my most used processes. The above sort of works, but loses the titles of any modeless dialogs called.
what am I doing wrong?
What is the best way to create such a menu system ?
thx
Code:
'Date Created: 08-Oct-2021 01:29:25 PM 'Last Updated: 17-Oct-2021 07:24:29 AM 'Created By : Graham 'Updated By : Graham temp_list = <<%list% Browse^Aircraft^Aircraft_Compendium Browse^Aircraft^aircraft_Type_Listing Browse^Aircraft^aircraft_UAV_Listing Browse^Air_Arm^Air_Arm_Name Browse^AMARC^AMARC Browse^AMARC^AMARC_Abbrev Browse^AMARC^AMARC_Origin_Id Browse^Base^Base_Add Browse^Base^Base_And_Place_Names Browse^Base^Base_details Browse^Base^Base_Master_Large Browse^BGA^BGA Browse^BGA^BGA1000to5299 Browse^BGA^missing_BGA Browse^Complete^Complete_Logging_details Browse^Location^allcountry_postcodes Browse^Location^location_fleet_browse Browse^Logging^Christoph_Allocations Browse^Logging^Complete_Logging Browse^Logging^Current_Logging Browse^Logging^logging_Data_input Browse^Operator^Operator_Air_Arm_Names Browse^Operator^Operator_and_fleet Browse^Operator^Operator_ATC_sqn Browse^Operator^Operator_Edit Browse^Operator^Operator_IATA Browse^Operator^Operator_ICAO Browse^Operator^Operator_Orbat Browse^Operator^Operator_Orbat_bmps Browse^Radio^Radio_Freqs_New Browse^Radio^Radio_Frequencies Browse^RIAT^Show_Movements_Browse Browse^RIAT^Show_PPR Browse^Work_File^Scramble_Update Browse^Work_File^SeaWavesData Browse^Work_File^Work_File_Base_List Browse^Work_file^work_file_oper_list Browse^Work_file^Work_File_prod_list Browse^Work_File^Work_File_Reg_List Browse^Work_File^Work_File_Reg_List Form^Aircraft^Aircraft_Types_Edit Form^Base^Base_master_Edit Form^Location^Location_Listing Form^Logging^Logging_details Form^Logging^Logging_Master_edit Form^Operator^Operator_edit Form^Operator^Operator_Fleet_Checker Form^Work_File^Work_file_reg_list Script^Web^dlg_display_Web_General Script^Log^dlg_LogCheckerPlus Script^Log^dlg_Modeless_Lookup Script^Log^dlg_WrittenLog Script^Bitmaps^dlg_copy_bitmap_files Script^Bitmaps^dlg_copy_new_bitmaps Script^Scramble^Scramble_Update Script^Web^dlg_post_web_data %list% tl = *count(temp_list) DELETE a_Option DIM a_Option[tl] as c main_menu_tree_title = "Main Menu Tree" a_Option.initialize(temp_list) a_option.sort("A") dlg_contracted = <<%dlg% {Background=#234+234+255} {can_exit=close} {position=remember=Main_menu_tree_dialog} <%T=Rolldown Dialog;I=a5_arrow_purple_down%!Rolldown_Tree_button_click> {sp}<%T=Close Dialog;I=$$generic.exit%!CloseEvent> {sp}{'%O={F=Bahnschrift,10,B}{C=Black}Minimised %dlg% dlg_expanded = <<%dlg% {Background=#234+234+255} {watch=Option!OptionEvent} {region} [%S=BLR;D="^"%.40,12Option^<a_Option]; {endregion}; {line=1,0}; {region} <%T=Close Dialog;I=$$generic.exit%!CloseEvent> {position=remember=main_menu_tree_dialog} {sp}<%T=Rollup Dialog;I=a5_arrow_purple_up%!Rollup_tree_button_Click>{sp=2} {condition=(GoFlag=.t.)} <%T=Go;O={J=C,C}{C=Brown}{F=Bahnschrift,10,B}{B=Tan}Go%10,0!Go?GoFlag> {endregion}; {endregion}; %dlg% event_expanded = <<%code% if a_dlg_button = "OptionEvent" then if ("^" $ Option) then GoFlag = .t. else GoFlag = .f. end if end if if a_dlg_button = "CloseEvent" then ui_modeless_dlg_close(main_menu_tree_title) end if if a_dlg_button = "GO" then select case word(Option,1,"^") = "Form" DIM Shared Frm as P layout_name = word(Option,3,"^") DIM tempP as p tempP=obj(":"+object_Name_normalize(word(layout_name,1,"@"))) if is_object(tempP) then if tempP.class() = "form" then tempP.activate() else Frm = :Form.view(layout_name) frm.maximize() end if else Frm = :Form.view(layout_name) frm.maximize() end if case word(Option,1,"^") = "Browse" DIM Shared Bwse as P layout_name = word(option,3,"^") DIM tempP as p tempP=obj(":"+object_Name_normalize(word(layout_name,1,"@"))) if is_object(tempP) then if tempP.class() = "browse" then tempP.activate() else Bwse = :Browse.view(layout_name) Bwse.maximize() end if else Bwse = :Browse.view(layout_name) Bwse.maximize() end if case word(Option,1,"^") = "Script" script_play(word(option,3,"^")) end select Option = "" ui_modeless_dlg_box(main_menu_tree_title,dlg_contracted,event_contracted) end if if a_dlg_button = "rollup_Tree_button_click" then ui_modeless_dlg_box(main_menu_tree_title,dlg_contracted,event_contracted) a_dlg_button = "" end if %code% event_contracted = <<%code% if a_dlg_button = "Rolldown_Tree_button_click" then ui_modeless_dlg_box(main_menu_tree_title,dlg_expanded, event_expanded) a_dlg_Button = "" end if if a_dlg_button = "CloseEvent" then ui_modeless_dlg_close(main_menu_tree_title) end if %code% ui_modeless_dlg_box(main_menu_tree_title,dlg_expanded, event_expanded)
what am I doing wrong?
What is the best way to create such a menu system ?
thx
Comment