On Wednesday 03 September 2008 04:57:44 pm Dave Rowe wrote:
> On Wed, 3 Sep 2008 18:48:26 -0500, Ed Leafe <[EMAIL PROTECTED]> wrote:
> > You're adding all the controls to the grid sizer, but you're not
> > adding the grid sizer to your dialog's sizer. Try adding:
> >
> > sizer.append1x(grid)
> >
> > ...after the code that adds everything to the grid sizer.
> >
> >
> > -- Ed Leafe
>
> Sorry, bad copy & paste job. I did have that, but the dialog is still
> quite narrow. When would self.Size be effective to widen the dialog?
>
> Dave
I'm not sure this will help but I offer it because I recall I had to do
something similar in the past.
for i in range(self.grid.ColumnCount):
mysize = mysize + self.grid.Columns[i-1]._getWidth()
self.Size = (mysize,450)
That should size the dialog based on the size of the grid.
You could also base the size on the current active form.
def getFormsize():
ret = dabo.dAppRef.ActiveForm
if not ret:
# Could be a dead object
ret = None
return ret.Size #should be the size of the active form in a tuple
Then use the return value to set the size of the dialog.
Of course I really think the above is going outside normal required coding.
However, I did notice that in the ClassDesigner when Ed's uses
dOkCancelDialog he adds panels and calls self.layout() so maybe there is
something in wx that is causing your problem (and therefore my past problem
too). You might add a panel and see if that helps.
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]