It is currently Wed Dec 02, 2020 11:00 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: FormDesigner - Problems with SplitterGadget
PostPosted: Thu Feb 06, 2020 11:39 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 11, 2004 7:07 am
Posts: 644
The code runs very well, but the FormDesigner can not show the right pane:
Code:
;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;

Enumeration FormWindow
  #Window_0
EndEnumeration

Enumeration FormGadget
  #ListIcon_0
  #Panel_0
  #Splitter_0
  #Panel_1
  #Splitter_1
EndEnumeration


Procedure OpenWindow_0(x = 0, y = 0, width = 1280, height = 800)
  OpenWindow(#Window_0, x, y, width, height, "", #PB_Window_SystemMenu)
  ListIconGadget(#ListIcon_0, 8, 8, 1000, 600, "Column 1", 100)
  PanelGadget(#Panel_0, 8, 617, 1000, 175)
  AddGadgetItem(#Panel_0, -1, "Tab 1")
  CloseGadgetList()
  SplitterGadget(#Splitter_0, 8, 8, 1000, 784, #ListIcon_0, #Panel_0)
  SetGadgetState(#Splitter_0, 600)
  PanelGadget(#Panel_1, 1017, 8, 255, 784)
  AddGadgetItem(#Panel_1, -1, "Tab 1")
  CloseGadgetList()
  SplitterGadget(#Splitter_1, 8, 8, 1264, 784, #Splitter_0, #Panel_1, #PB_Splitter_Vertical)
  SetGadgetState(#Splitter_1, 1000)
EndProcedure

Procedure Window_0_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



Top
 Profile  
Reply with quote  
 Post subject: Re: FormDesigner - Problems with SplitterGadget
PostPosted: Thu Feb 06, 2020 2:25 pm 
Offline
Addict
Addict

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 956
This is a nesting error in your code and the form designer can't display it.
See objects tree: the panel you can't see (Panel_1 ?) is a member of a splitter (Splitter_0) that is not member of any containing object. (ie: panel)
Left click on his name on Objects Tab and change parent object (or try to drag'n'drop it on tree)

:wink:


Last edited by Marc56us on Sun Mar 08, 2020 10:05 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: FormDesigner - Problems with SplitterGadget
PostPosted: Tue Feb 11, 2020 10:01 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jun 11, 2004 7:07 am
Posts: 644
Marc56us wrote:
This is a nesting error in your code

I see no nesting error in the code...

#Splitter_0 is a member of #Splitter_1:
SplitterGadget(#Splitter_1, 8, 8, 1264, 784, #Splitter_0, #Panel_1, #PB_Splitter_Vertical)

#Splitter_0 contains #ListIcon_0 and #Panel_0:
SplitterGadget(#Splitter_0, 8, 8, 1000, 784, #ListIcon_0, #Panel_0)

All OK!

Try the code without form designer!
Copy the lines above in a new project, add these two lines and press F5:
Code:
OpenWindow_0()
Repeat: Until WindowEvent() = #PB_Event_CloseWindow


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye