WxListBox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LutherRevisited

    #1

    WxListBox

    I'm wanting to put a listbox in the place of a textctrl I'm using in my
    application because I'm running out of space in my textctrl. The online
    documentation is down at wxpython.org so I have no idea how to construct this
    control or anything. Can someone help me out. Here's what I'm doing with the
    WxTextCtrl:

    self.text_ctrl_ 4 = wx.TextCtrl(sel f, -1, "", style=wx.TE_MUL TILINE)
    sizer_1.Add(sel f.text_ctrl_4, 6, wx.LEFT|wx.RIGH T|wx.EXPAND, 80)
    self.text_ctrl_ 4.AppendText(st r(count) + '\t\t' + str(address) + '\t\t'
    + str(pageNumber) + '\t\t' + str(pageArray[pageNumber, 1]) +'\r\n')

    I'm wanting to implement something similar with a listbox, any thoughts?
  • Steve Holden

    #2
    Re: WxListBox

    LutherRevisited wrote:
    [color=blue]
    > I'm wanting to put a listbox in the place of a textctrl I'm using in my
    > application because I'm running out of space in my textctrl. The online
    > documentation is down at wxpython.org so I have no idea how to construct this
    > control or anything. Can someone help me out. Here's what I'm doing with the
    > WxTextCtrl:
    >
    > self.text_ctrl_ 4 = wx.TextCtrl(sel f, -1, "", style=wx.TE_MUL TILINE)
    > sizer_1.Add(sel f.text_ctrl_4, 6, wx.LEFT|wx.RIGH T|wx.EXPAND, 80)
    > self.text_ctrl_ 4.AppendText(st r(count) + '\t\t' + str(address) + '\t\t'
    > + str(pageNumber) + '\t\t' + str(pageArray[pageNumber, 1]) +'\r\n')
    >
    > I'm wanting to implement something similar with a listbox, any thoughts?[/color]

    Well, my *first* thought was "Isn't a listbox supposed to allow choice
    between alternative? How can that substitute for what looks like a very
    complex text input?"

    My second thought was "It's not very helpful to use a name like
    'text_ctrl_4' in the code".

    I'm also not really sure what the double-tabs are supposed to do.

    Perhaps you could explain exactly what you'd like your program to do
    here, as at present it's not even clear whether this code is intended to
    act as input as well as output? What's wrong with what happens now, and
    how would you like to change it?

    regards
    Steve
    --
    Steve Holden http://www.holdenweb.com/
    Python Web Programming http://pydish.holdenweb.com/
    Holden Web LLC +1 703 861 4237 +1 800 494 3119

    Comment

    Working...