PanelGadget FixedWidth & Spacing

Just starting out? Need help? Post your questions and find answers here.
SoFlawLess_
New User
New User
Posts: 5
Joined: Wed Jul 25, 2012 3:50 am

PanelGadget FixedWidth & Spacing

Post by SoFlawLess_ »

Hi, I'm trying to make every tab on my PanelGadget the same width ... I've tried using #TCS_FIXEDWIDTH but all it does it not show the tabs.

Also, is it possible to increase the vertical spacing between the tab and the panel?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PanelGadget FixedWidth & Spacing

Post by IdeasVacuum »

IdeasVacuum
If it sounds simple, you have not grasped the complexity.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 5014
Joined: Sun Apr 12, 2009 6:27 am

Re: PanelGadget FixedWidth & Spacing

Post by RASHAD »

Code: Select all

  TWidth = 80
  THeight = 25
  
  If OpenWindow(0, 0, 0, 322, 220, "PanelGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    PanelGadget     (0, 8, 8, 306, 203)    
      AddGadgetItem (0, -1, "Panel 1")
        PanelGadget (1, 5, 5, 290, 166)
          AddGadgetItem(1, -1, "Sub-Panel 1")
          AddGadgetItem(1, -1, "Sub-Panel 2")
          AddGadgetItem(1, -1, "Sub-Panel 3")
        CloseGadgetList()
        SetWindowLong_(GadgetID(1), #GWL_STYLE, GetWindowLong_(GadgetID(1), #GWL_STYLE) | #TCS_FIXEDWIDTH)
        SendMessage_(GadgetID(1), #TCM_SETITEMSIZE, 0, TWidth|THeight<<16)
      AddGadgetItem (0, -1,"Panel 2")
        ButtonGadget(2, 10, 15, 80, 24,"Button 1")
        ButtonGadget(3, 95, 15, 80, 24,"Button 2")
    CloseGadgetList()
    SetWindowLong_(GadgetID(0), #GWL_STYLE, GetWindowLong_(GadgetID(0), #GWL_STYLE) | #TCS_FIXEDWIDTH)
    SendMessage_(GadgetID(0), #TCM_SETITEMSIZE, 0, TWidth|THeight<<16)
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf

Egypt my love
Post Reply