Cloud: OneDrive EventDesigner
Structure of the form files without the FormDesignerCreating of an executable program from one or several form files with complete event-handling for windows, menus and gadgets.
Features:
- Extension of the IDs for menus and gadgets with WindowID as prefix
- Afterwards changing of the original form files
- First window as parend window
- Set Windowposition Auto (#PB_Ignore)
- Include images
- Translate in MenuItem(...) '\t' to '+ #TAB$ +' for using shortcuts
- Saving of last preferences in project file
Process:
Create several Forms.pbf with the PureBasic FormDesigner without PB_Any and without event procedures and add them to the EventDesigner.
After successful creation of the event codes, the following files are ready.
- GuiCommonFile.pb
- GuiMainFile.pb
- GuiEventMainFile.pb
- GuiEvent[Form].pb
After changing of the original form files new events will be added
and is changing constants the code is updated.
Info:
- PB_Any is not supported
- Deactivate main and event procedure on FormDesigner
* The Copy Images option copies the files to the [ProjectPath]/Resources folder.
* Under macOS copied to the folder [ProjectPath]/MyAppData/Resources
! macOS:
! So that the resources are available in the APP at runtime, you need the MacOS IDE tool MyAppData.
! The required code for the tool can be saved under Menu Tools.
Code: Select all
;-TOP
; Enumeration not used
LoadFont(#Constant, ...)
Use[XY]ImageDecoder()
LoadImage(#Constant, ...)
; ----
;{ Begin : This always in the same form file
Procedure Open[Window_Constant]()
If OpenWindow(#Window_Constant, ...)
; ...
EndIf
EndProcedure
; ----
Procedure ResizeGadgets[Window_Constant]()
; ...
EndProcedure
;} End
; ----
Procedure InitPopupMenu()
If CreatePopupImageMenu(#Popup_Constant[, ...])
; ...
EndIf
EndProcedure : InitPopupMenu() ; On same line
; ----
Procedure [Others]()
UseGadgetList(WindowID(#Window_Constant))
; ...
EndProcedure