Re: syntax question

john fabiani <[email protected]> Tue, 3 Nov 2020 16:13:15 -0800
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
I'm not sure this will help but I'd try and use a gridsizer.

A grid sizer is a sizer which lays out its children in a two-dimensional 
table with all table fields having the same size, i.e.

the width of each field is the width of the widest child, the height of 
each field is the height of the tallest child.


https://wxpython.org/Phoenix/docs/html/wx.GridSizer.html

Johnf


On 11/3/20 3:43 PM, Nathan smith wrote:
> Hi folks,
>
>
> I was just wondering something about size qualifiers.
>
>
> For instance here is my example text box:
>
>    self.t1 = wx.TextCtrl(panel,style=wx.TE_PROCESS_ENTER)
>    hbox1.Add(self.t1,1,wx.EXPAND|wx.ALIGN_LEFT|wx.ALL,5)
>
>
> In this example, hbox1 is a sizer set up thus:
>
>   hbox1 = wx.BoxSizer(wx.HORIZONTAL)
>
>
> What I'd like to do is build a table of text boxes that is 10 by 10 
> and make this appear in a decent size on all screens, or as many as I 
> can.
>
>
> I was wondering, is this possible somehow?
>
>    self.t1 = wx.TextCtrl(panel,style=wx.TE_PROCESS_ENTER, size=(10%,10%))
>    hbox1.Add(self.t1,1,wx.EXPAND|wx.ALIGN_LEFT|wx.ALL,5)
>
>
> Obviously I know one way is to get the figures by getting the size of 
> the screen then dividing by ten, and using those figures in the sizer, 
> but is there a quicker way about this?
>
> All the best.
>
> Nathan
>

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/454ef63f-fb49-b112-0c03-0605b16bd632%40gmail.com.