syntax question

Nathan smith <[email protected]> Tue, 3 Nov 2020 23:43:03 +0000
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
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/ebe30290-7f2b-faa8-ca9e-02b9e7e86de1%40gmail.com.