splitter gadget in form editor

You need some new stunning features ? Tell us here.
julesd
User
User
Posts: 23
Joined: Fri May 24, 2013 1:39 am

splitter gadget in form editor

Post by julesd »

How do I go about using the splitter gadget in PB 5.20 using the form editor?

I have created a explorer tree gadget and then a editor gadget then tried to apply the splitter
with no results.
julesd
User
User
Posts: 23
Joined: Fri May 24, 2013 1:39 am

Re: splitter gadget in form editor

Post by julesd »

I guess no one knows this one.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: splitter gadget in form editor

Post by Polo »

When creating the splitter it asks to select the 2 gadgets.
What exactly is not working?
julesd
User
User
Posts: 23
Joined: Fri May 24, 2013 1:39 am

Re: splitter gadget in form editor

Post by julesd »

I then select the 2 object and still nothing.
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 627
Joined: Mon May 09, 2011 9:36 am

Re: splitter gadget in form editor

Post by VB6_to_PBx »

julesd wrote:I then select the 2 object and still nothing.
1-Place or Draw 2 Gadgets of your choice on the Window

2-Select the SplitterGadget ,
then Select 1 of the 2 previous Gadget you placed on the Window
Select the 2nd Gadget

3-Click the Start Drawing button on the SplitterGadget Menu

4-Start drawing the SplitterGadget dimensions on the Window around your 2 previous Gadgets with your Mouse

5-Release your Mouse , and the SplitterGadget automatically joins the 2 Gadgets you chose together inside the Splitter Gadget

example of what it should look like :

Code: Select all

Enumeration FormWindow
  #Window_1
EndEnumeration

Enumeration FormGadget
  #Editor_0
  #ExplorerTree_0
  #Splitter_0
EndEnumeration


Procedure OpenWindow_1(x = 0, y = 0, width = 506, height = 590)
  OpenWindow(#Window_1, x, y, width, height, "", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_ScreenCentered)
  SetWindowColor(#Window_1, RGB(192,192,192))
  EditorGadget(#Editor_0, 20, 5, 471, 288)
  ExplorerTreeGadget(#ExplorerTree_0, 20, 302, 470, 279, "")
  SplitterGadget(#Splitter_0, 20, 5, 471, 576, #Editor_0, #ExplorerTree_0, #PB_Splitter_Separator)
  SetGadgetState(#Splitter_0, 288)
EndProcedure

Procedure Window_1_Events(event)
  Select event
    Case #PB_Event_CloseWindow
      ProcedureReturn #False

    Case #PB_Event_Menu
      Select EventMenu()
      EndSelect

    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
  EndSelect
  ProcedureReturn #True
EndProcedure

OpenWindow_1()

Repeat
  event = WaitWindowEvent()
Until Window_1_Events(event) = #False

End
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
julesd
User
User
Posts: 23
Joined: Fri May 24, 2013 1:39 am

Re: splitter gadget in form editor

Post by julesd »

thanks, it's working.
Post Reply