SplitterGadget()

Just starting out? Need help? Post your questions and find answers here.
Fenix
Enthusiast
Enthusiast
Posts: 102
Joined: Wed May 07, 2003 1:45 am
Location: Germany

SplitterGadget()

Post by Fenix »

Hi @ all,

I want to use three gadgets combined by two splitter gadgets (one gadget is used in both splitters). But this has some ugly effects, in other words: it doesn't work :(

Code: Select all

OpenWindow(0, 10, 10, 510, 300, "SPLITTER", #PB_Window_ScreenCentered | #PB_Window_WindowCentered | #PB_Window_SystemMenu)

; first splitter
ButtonGadget(11, 0, 0, 0, 0, "BTN1")
ButtonGadget(22, 0, 0, 0, 0, "BTN2")
SplitterGadget(99, 0, 0, 250, 150, 11, 22, #PB_Splitter_Separator | #PB_Splitter_Vertical)

; second splitter
ButtonGadget(33, 0, 0, 0, 0, "BTN3")
SplitterGadget(98, 125, 0, 250, 150, 22, 33, #PB_Splitter_Separator | #PB_Splitter_Vertical)

Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
End
I there a way to do it anyway?? Does the splitter gadget fire any event when it's being clicked/moved?

Thanx,
Fenix
User avatar
skywalk
Addict
Addict
Posts: 4265
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: SplitterGadget()

Post by skywalk »

Link the 1st splitter gadget # in your 2nd splitter and play around with your desired actions.

Code: Select all

OpenWindow(0, 10, 10, 510, 300, "SPLITTER", #PB_Window_ScreenCentered | #PB_Window_WindowCentered | #PB_Window_SystemMenu)

; first splitter
ButtonGadget(11, 0, 0, 0, 0, "BTN1")
ButtonGadget(22, 0, 0, 0, 0, "BTN2")
SplitterGadget(99, 0, 0, 250, 150, 11, 22, #PB_Splitter_Separator | #PB_Splitter_Vertical)

; second splitter
ButtonGadget(33, 0, 0, 0, 0, "BTN3")
SplitterGadget(98, 125, 0, 250, 150, 99, 33, #PB_Splitter_Separator | #PB_Splitter_Vertical)

Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
End
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Fenix
Enthusiast
Enthusiast
Posts: 102
Joined: Wed May 07, 2003 1:45 am
Location: Germany

Re: SplitterGadget()

Post by Fenix »

skywalk wrote:Link the 1st splitter gadget # in your 2nd splitter and play around with your
Never thought of using a splitter gadget insider another spliter :idea:
It work's exactly how I wanted it :D

Thanx skywalk!!
mestnyi
Addict
Addict
Posts: 1109
Joined: Mon Nov 25, 2013 6:41 am

Re: SplitterGadget()

Post by mestnyi »

Fenix in your example, when you move why the second splitter and the first move? How to avoid?
Post Reply