Re: [Boa Constr] control layout in GUI Designer
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2001-01-18 14:53:28
|
Geoff Talvola wrote: > > Riaan Booysen wrote: > > > Hi Geoff, > > > > Geoff Talvola wrote: > > > > > > How can I get Boa's GUI Designer to let me locate controls to multiples of 4 instead of multiples of 8? > > > > > > The reason I ask is because I'm trying to line up a bunch of wxStaticText controls with wxTextCtrl controls, and they line up properly if the wxStaticText's y position is 4 units below the wxTextCtrl's y position. But the GUI Designer is snapping all controls to multiples of 8. > > > > > > > This should be a runtime changeable setting, but in the meantime, > > in the module Views.SelectionTags, line 25 change the value of > > screenGran. > > Have you tried it? I just tried changing screenGran to 4, and it causes my frame window to automatically resize itself to be 780 units tall! Every time I try to shrink it back down, it automatically resizes itself to 780 units tall. Try it and see if you get the same behavior. I'm running on Windows, by the way. Ouch! No I didn't try it, but I used to have it at at 4 a while ago and assumed it would still work. You are running the CVS version of Boa? This uncovered a hack that granulises the frame size when it is resized. in Views.Designer.OnControlResize change the following: # Granularise frame sizing so that controls inside main frame # fits exactly sze = dsgn.GetSize() granSze = granularise(sze.x), granularise(sze.y)+3 dsgn.SetSize(granSze) to # Granularise frame sizing so that controls inside main frame # fits exactly sze = dsgn.GetClientSize() granSze = granularise(sze.x), granularise(sze.y) if sze.asTuple() != granSze: dsgn.SetClientSize(granSze) > > I get the same bug if screenGran is set to 5 or 6, but it does work properly if it's set to 7. > > -- > > - Geoff Talvola > Parlance Corporation > gta...@Na... Thanks for picking this up. -- Riaan Booysen ___________________________________________________ Boa Constructor - RAD GUI building IDE for wxPython http://boa-constructor.sourceforge.net |