It is currently Sun Dec 15, 2019 12:10 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SplitterGadget + ContainerGadget
PostPosted: Tue Jun 06, 2017 12:10 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 510
In my application, I have several SplitterGadgets with ContainerGadgets inside them. There seems to be an issue on Linux, however.

Code:
Enumeration
  #Window
  #Splitter
  #Container1
  #Container2
  #Button1
EndEnumeration

Procedure WindowResized()
  ResizeGadget(#Splitter, 0, 0, WindowWidth(#Window), WindowHeight(#Window))
EndProcedure

Procedure SplitterMoved()
  ResizeGadget(#Button1, 0, 0, GadgetWidth(#Container1), GadgetHeight(#Container1))
EndProcedure

If OpenWindow(#Window, 0, 0, 640, 480, "SplitterGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
 
  BindEvent(#PB_Event_SizeWindow, @WindowResized(), #Window)
 
  ContainerGadget(#Container1, 0, 0, 0, 0, #PB_Container_Single)
    ButtonGadget(#Button1, 0, 0, 0, 0, "One")
  CloseGadgetList()
  ContainerGadget(#Container2, 0, 0, 0, 0, #PB_Container_Single)
  CloseGadgetList()
 
  SplitterGadget(#Splitter, 0, 0, WindowWidth(#Window), WindowHeight(#Window), #Container1, #Container2, #PB_Splitter_Separator)

  BindEvent(#PB_Event_Gadget, @SplitterMoved(), #Window, #Splitter, #PB_All)
 
  PostEvent(#PB_Event_Gadget, @SplitterMoved(), #Window)
 
  Repeat
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

As the ButtonGadget gets bigger, it stops the SplitterGadget bar from moving upwards. Is this the normal behaviour on Linux? If so, how else could I have several gadgets on one side of a SplitterGadget?


Top
 Profile  
Reply with quote  
 Post subject: Re: SplitterGadget + ContainerGadget
PostPosted: Mon Nov 06, 2017 7:44 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Jun 26, 2014 9:17 am
Posts: 308
Location: Germany
Just reminded me of this problematic code on gtk3 and gave him a new test.
Now seems to work on PB5.46B1. :D

Regards, Charly

_________________
PureBasic 5.4-5.7, Linux: (X/L/K)Ubuntus+Mint - Windows XP (32Bit)
PureBasic Linux-API-Library & Viewer: http://www.chabba.de


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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