Just my opinion, but using any of the "Visual Designers" or "Form Editors" really slows me down to the point of frustration. I do admit to using them for XY coordinates of gadget polygons. I just move rectangles around and maybe on top of containers(panels,frames) for the slight offsets introduced. Then I view the generated source and cut and paste the "X,Y,Wd,Ht" pixels to my code section.
The same goes for Menus and Fonts and Images.
It is far too restrictive for me to enter all my information into little comboboxes and navigate through trees when I can cut and paste in a code window so much faster.
For beginners, it is way more instructive to just learn the gadget commands from the help and forum examples and follow them through to the Event Loop.
Once you are familiar with the basics you can up your game by resisting the urge to use gadget constants like #myTextBoxInput or #myListBox2. Instead use #PB_Any and store the gadget id's returned into a structured array or list. Then you can make global changes to your GUI without hardcoded #constant names and even change the creation order if you like. So many possibilities...
Coming from VB6, the PB gadget naming has to be understood...
Maybe this elaborates...
Code: Select all
;-{ PB Gadgets(description) = VB6 Control - prefix used
; 1. ButtonGadget(BU) = CommandButton - cmd
; gID = ButtonGadget (#PB_Any, x, y, Width, Height, Text$ [, Flags])
; 2. ButtonImageGadget(BI) = CommandButton w/API
; gID = ButtonImageGadget (#PB_Any, x, y, Width, Height, ImageID [, Flags])
; 3. CalendarGadget(CA) = DTPicker or NA - dtp
; gID = CalendarGadget (#PB_Any, x, y, Width, Height [, Date [, Flags]])
; 4. CanvasGadget(CG) = PictureBox pb or ImageBox img
; gID = CanvasGadget (#PB_Any, x, y, Width, Height [, Flags])
; 5. CheckBoxGadget(XB) = CheckBox - chk
; gID = CheckBoxGadget (#PB_Any, x, y, Width, Height, Text$ [, Flags])
; 6. ComboBoxGadget(CB) = ComboBox - cmb
; gID = ComboBoxGadget (#PB_Any, x, y, Width, Height [, Flags])
; 7. ContainerGadget(CN)(1 Panel) = NA
; gID = ContainerGadget (#PB_Any, x, y, Width, Height [, Flags])
; 8. DateGadget(DA)(StringGadget) = MaskedEdit control Or TextBox edit w/code
; gID = DateGadget (#PB_Any, x, y, Width, Height [, Mask$ [, Date [, Flags]]])
; 9. EditorGadget(E) = TextBox - txt
; Automatic vertical and horizontal scrollbars
; No context menu. (right mouse click), but does support ctrl+c, etc.
; gID = EditorGadget (#PB_Any, x, y, Width, Height [, Flags])
; 10.ExplorerComboGadget(XC) = DriveListBox, DirectoryListBox, FileListBox - requires code To assemble pieces
; gID = ExplorerComboGadget (#PB_Any, x, y, Width, Height, Directory$, [, Flags])
; 11.ExplorerListGadget(XL) = NA
; gID = ExplorerListGadget (#PB_Any, x, y, Width, Height, Directory$, [, Flags])
; 12.ExplorerTreeGadget(XT) = DriveListBox ++
; gID = ExplorerTreeGadget (#PB_Any, x, y, Width, Height, Directory$, [, Flags])
; 13.Frame3DGadget(FR) = Frame - fram
; gID = Frame3DGadget (#PB_Any, x, y, Width, Height, Text$ [, Flags])
; 14.HyperLinkGadget(HL) = Label w/code
; gID = HyperLinkGadget (#PB_Any, x, y, Width, Height, Text$, Color [, Flags])
; 15.IPAddressGadget(IP) = NA Or MaskedEditBox w/code
; gID = IPAddressGadget (#PB_Any, x, y, Width, Height)
; 16.ImageGadget(IM) = Image - img, PictureBox - pb
; gID = ImageGadget (#PB_Any, x, y, Width, Height, ImageID [, Flags])
; 17.ListIconGadget = ListView or MSGridControl
; gID = ListIconGadget (#PB_Any, x, y, Width, Height, Title$, TitleWidth [, Flags])
; 18.ListViewGadget(LV) = ListBox - lb
; gID = ListViewGadget (#PB_Any, x, y, Width, Height [, Flags])
; 19.MDIGadget(MD) = MDI Form w/code
; gID = MDIGadget (#PB_Any, x, y, Width, Height, SubMenu, MenuItem [, Flags])
; 20.OptionGadget(OP) = OptionButton - opt
; gID = OptionGadget (#PB_Any, x, y, Width, Height, Text$)
; 21.PanelGadget(PA) = SSTab - sst
; gID = PanelGadget (#PB_Any, x, y, Width, Height)
; 22.ProgressBarGadget(PB) = ProgressBar - pbar
; gID = ProgressBarGadget (#PB_Any, x, y, Width, Height, Minimum, Maximum [, Flags])
; 23.ScrollAreaGadget(SA) = NA
; gID = ScrollAreaGadget (#PB_Any, x, y, Width, Height, ScrollAreaWidth, ScrollAreaHeight [, ScrollStep [, Flags]])
; 24.ScrollBarGadget(SB) = HScrollBar, VScrollBar - hsb,vsb
; gID = ScrollBarGadget (#PB_Any, x, y, Width, Height, Minimum, Maximum, PageLength [, Flags])
; 25.ShortcutGadget(SK) = NA
; gID = ShortcutGadget (#PB_Any, x, y, Width, Height, Shortcut)
; 26.SpinGadget(SP) = UpDown - spin
; gID = SpinGadget (#PB_Any, x, y, Width, Height, Minimum, Maximum [, Flags])
; 27.SplitterGadget(SR) = NA
; gID = SplitterGadget (#PB_Any, x, y, Width, Height, #Gadget1, #Gadget2 [, Flags])
; 28.StringGadget(S) = TextBox w/single line only, txt
; Add #ES_MULTILINE flag, and it will handle more lines, but no scrollbars when text overflows.
; gID = StringGadget (#PB_Any, x, y, Width, Height, Content$ [, Flags])
; 29.TextGadget(T) (no events) = Label - lbl
; gID = TextGadget (#PB_Any, x, y, Width, Height, Text$ [, Flags])
; 30.TrackBarGadget(TB) = NA, use tiny scrollbar w/code
; gID = TrackBarGadget (#PB_Any, x, y, Width, Height, Minimum, Maximum [, Flags])
; 31.TreeGadget(TV) = TreeView, trv
; gID = TreeGadget (#PB_Any, x, y, Width, Height [, Flags])
; 32.WebGadget(WG) = NA or any IE component w/API code
; gID = WebGadget (#PB_Any, x, y, Width, Height, URL$ [, Flags])
;
; Additional Gadgets...
;
; 1. Window(W) = Form - frm
; wID = OpenWindow (#PB_Any, x, y, InnerWidth, InnerHeight, Title$ [, Flags [, ParentWindowID]])
; 2. AddGadgetItem = NA
; wID = AddGadgetItem (#PB_Any, Position, Text$ [, ImageID [, Flags]])
; ^^^ with MDI only
; AddGadgetItem (gID, Position, Text$ [, ImageID [, Flags]])
; 3. OpenGadgetList(O) = NA
; OpenGadgetList (gID [, Item])
; 4. CloseGadgetList(C) = NA
; CloseGadgetList ()
; 5. StatusBar(ST) = NA
; gID = CreateStatusBar (#PB_Any, WindowID(wID))
; AddStatusBarField (#PB_Ignore = Width)
; 6. ScintillaGadget = NA
; gID = ScintillaGadget (#PB_Any, x, y, Width, Height, @Callback())
; 7. Timer(TM)
; AddWindowTimer(#Window, Timer, Timeout)