[Gambas-user] getting dataview to expand??

rocko sunblaster5 at ...626...
Thu Aug 30 20:04:42 CEST 2012


On Thu, 2012-08-30 at 20:29 +0930, Bruce wrote:
> On Thu, 2012-08-30 at 11:47 +0200, Fabien Bodard wrote:
> > Yes you can
> > Put the button in a hbox and for example add a panel on the left on it and
> > set the expand property of the panel to true. You will have a right aligned
> > button. You have tools, then it's just matter of imagination
> > Le 29 août 2012 23:10, "rocko" <sunblaster5 at ...626...> a écrit :
> > 
> > >
> 
> Rocko,
> 
> I have attached a project which I hope might help you.
> 
> (Forgive me Richard!) It was Richard Walker's sample project for
> assessing his gb.Desktop problems recently - errm as amended by me for
> my own purposes.
> 
> Look at how it runs and responds to resizing, maximizing etc on the
> screen. In particular, look at dragging the bottom right hand corner. Is
> this the type of thing you are looking for?
> 
> Then look at the form layout in the IDE.  
> 
> 
> Before we start, look at the help for the following !Properties! (not
> events!):
> 
> Form.Arrangement (Returns or sets how this THING arrange its children
> controls.)
> 
> Form.Expand ((inherited from control) Returns or sets if a THING will
> expand if included in a container that arranges its contents.)
> 
> <AnyContainer>.Spacing and .Margin and .Padding
> 
> OK? Now, the form is arranged Arrange.Vertical  That is, "Indicates that
> a container layout its children vertically.  
> The children control extends their width to the width of the container
> inside."  
> 
> Turning that into en_AU, I read: "If you set a container's Arrange
> property to "Arrange.Vertical" (or "Vertical" in the IDE property
> designer) then firstly, all the children in that container will be laid
> out one under the other in the order determined by their Y property.
> Secondly, (unless otherwise instructed by their Ignore property*) each
> child control will be expanded horizontally to the width of that
> container's "inside" (refer back to the Padding and Margin properties)."
> 
> One thing you should note here is just what does "children" mean.  It
> means only the direct or "first level" controls within the container.
> In other words, if container A contains a container B that contains a
> control C, then we are only talking about the layout of container B
> within container A.
> 
> So, within Richard's form, (ignoring the timers, which are virtual
> controls anyway) there are two children "Panel1" and "HBox2".  Remember,
> FMain is .Arrange=Arrange.Vertical, .Spacing=True and .Margin=True.
> What happens is that FMain, when it is resized in any way will layout
> Panel1 and HBox2 one under the other in that order and expand them to
> the width of it's "inside".  Nothing more and nothing less.
> 
> Note however, that Panel1's .Expand property is set to True and
> HBox2's .Expand property is set to False.  
> 
> Try changing the HBox2.Expand property to True.  See what happens.
> 
> I have rattled on here at length.  Have a look at what happens within
> these two containers.  Report back if it is or is not starting to make
> sense :-)
> 
> Bruce 

Thanks I got the button pretty much how I want it.
But I cannot for the life of me get the dataBrowser to expand to the
left(Horizontal).
I want the dataBrowser to be at the top of the window and expand to the
left when the window is maximized.
I have it in a dataSource and Vpanel as i want to line things up
verticaly.Also have tried a Hpanel without luck, but I cannot figure out
how to get it to expand to the left.

I tried following the example project you sent, but couldn't get my
dataBrowser to expand left, it will only expand down.

How did you get the 'txtWindowLister' and the 'txtDTWatcherEvents' to
expand to the left??

> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user

-- 
rocko <sunblaster5 at ...626...>





More information about the User mailing list