On Monday 12 February 2007 04:54, Ed Leafe wrote:
> On Feb 11, 2007, at 11:27 PM, johnf wrote:
> > Setting the size in the afterinit works.  But I'm Multiplying the
> > width of the
> > grid by 2.5 to get a normal look.
> > I have already populated the grid with data so I would think the
> > grid would
> > know the size it should be.
>
>       Grids don't have a way of sizing themselves. You have to either use
> Sizers or hard-code the dimensions.
>
>       Dialogs have an 'AutoSize' property that, when True, causes them to
> resize themselves to fit their controls.
>
> -- Ed Leafe
> -- http://leafe.com
> -- http://dabodev.com
>
>
>
> _______________________________________________
> Post Messages to: [email protected]
> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Ed, I am using sizers.  The grid gets populated in "afterinit ".  I think 
the "AutoSize" of the dDialog occurs even if I set "AutoSize" to false.
class dynamicDialog(dabo.ui.dDialog):
    def __init__(self,CallForm):
        self.callForm = CallForm
        self.AutoSize = False
        self.Centered = True
        super(dynamicDialog,self).__init__()

When "AutoSize" is set to True I don't see a difference.  

To solve the actual problem I'm now using:
self.Size = (self.callForm.Size[0] * .8, self.callForm.Size[1] * 7)

But that is a guess.  What I want is to have the "AutoSize" to determine the 
width of the Grid after it is populated and adjust.
What I think might be happening is the "AutoSize" is determining the size of 
the last hSizer I added to provide the width setting.  It seems I can always 
see the buttons I've added along the bottom of the form.
-- 
John Fabiani

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to