SplitterGadget wishes

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Danilo
Addict
Addict
Posts: 3038
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

SplitterGadget wishes

Post by Danilo »

It would be nice to have

Code: Select all

SetGadgetAttribute(#gadget, #PB_Splitter_BarSize, 2)          ; Size (width/height) of the Splitter bar (1,2,3,4 pixels)
SetGadgetAttribute(#gadget, #PB_Splitter_DrawBarIcon, #True)  ; Draw the bar icon
SetGadgetAttribute(#gadget, #PB_Splitter_DrawBarIcon, #False) ; Don't draw the bar icon, use background/border color only
User avatar
Danilo
Addict
Addict
Posts: 3038
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: SplitterGadget wishes

Post by Danilo »

The reason for a smaller bar width and a splitter bar without icon is using it for things like ListEx:
Image

On macOS I always get a separator icon, even without specifying #PB_Splitter_Separator (bug?),
and having a smaller bar (like 1 or 2 pixels) is also required for nice-looking cells.

Code: Select all

If OpenWindow(0, 0, 0, 230, 180, "SplitterGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    chk1   = CheckBoxGadget(#PB_Any,0,0,0,0,"")
    inp1   = StringGadget(#PB_Any,0,0,0,0,"Input")
    inp2   = StringGadget(#PB_Any,0,0,0,0,"Input")
    split1 = SplitterGadget(#PB_Any, 0, 0, 0, 0, chk1, inp1, #PB_Splitter_Vertical)
    SetGadgetAttribute(split1,#PB_Splitter_FirstMinimumSize,20)
    SetGadgetAttribute(split1,#PB_Splitter_SecondMinimumSize,20)
    split2 = SplitterGadget(#PB_Any, 5, 5, 220, 25, split1, inp2, #PB_Splitter_Vertical)
    SetGadgetAttribute(split2,#PB_Splitter_FirstMinimumSize,50)
    SetGadgetAttribute(split2,#PB_Splitter_SecondMinimumSize,20)

    Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Post Reply