On Wed, 29 Aug 2012, rocko wrote:
> On Wed, 2012-08-29 at 19:37 +0930, Bruce wrote:
> > On Wed, 2012-08-29 at 11:57 +0200, Tobias Boege wrote:
> > > On Tue, 28 Aug 2012, rocko wrote:
> > > > Been trying to get a dataview to expand when the window is maximized.
> > > > I assume the dataview needs a container to do that, but which container?
> > > > 
> > > > 
> > > > -- 
> > > > rocko <sunblast...@gmail.com>
> > > > 
> > > 
> > > You mean: Resize the DataView when the Window is resized?
> > > Fortunately, Gambas is Basic so that goes rather programmatically:
> > > 
> > > Public Sub Form_Resize() ' Catch the Resize event of the Window
> > >   DataView.Resize(...) ' Insert values; you can refer to the new
> > >                        ' dimensions of the Window via Me.W, Me.H
> > > End
> > > 
> > > The Window itself is your container in this case but I can't recall any
> > > container that resizes its children automatically...
> > > 
> > > Regards,
> > > Tobi
> > 
> > ??? How about any container that has an Arrangement property ???
> > (including Form).
> > 
> > or have I misunderstood?
> > 
> > B
> 
> If I set the Form arraignment to 'fill' it fills the entire form with
> the close button.
> I have the DataView inside a dataSource with the arraignment prop set to
> 'fill' which works, but only resizes the dataView to the size of the
> dataSource not the Form window when maximized.
> 
> Should I have not put the dataView inside the dataSource and just put on
> the form??
> How do I stop the close button from filling the entire form?
> 
> Would like to try Tobias suggestion but I am unsure of the syntax.
> DataView1.Resize = Me.W(600) ??? suggestions?
> 
> > 
> > 
> > 
> > ------------------------------------------------------------------------------
> > 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@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> -- 
> rocko <sunblast...@gmail.com>

Me.W is the width of the form, which is a property and not a function. So if
you want to resize the DataView to the dimensions of the Form minus 14 each,
you would do:

DataView1.Resize(Me.W - 14, Me.H - 14)

It may be that you need to resize the DataSource, too, as it is the
immediate parent of the DataView. I don't know, just try a little bit.

Regards,
Tobi

------------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to