473,657 Members | 2,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?
Jul 18 '05 #1
1 2130
LutherRevisited wrote:
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?


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
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4190
by: Daniel Ehrenberg | last post by:
I'm trying to learn wxPython, but I can't seem to find much documentation. The wxPython website says that all advanced (and even some basic) documentation for wxPython is only available in C++ syntax in the main wxWindows documentation. It also says that the samples will help, but I can't seem to make sense of them. Should I just use a not-as-good GUI like Tkinter or a not-as-common one like Anygui or PyUI if I want to have documentation?...
5
10604
by: Andrew | last post by:
Hi I just started learning wxPython I wanted to know how I could do this in wxPython self.listbox.delete(0, END) for item in self.results: self.listbox.insert(END, item)
4
1815
by: Eric | last post by:
How does one use wxDirDialog to select and get a computer name from the network? Or which widget should i use to accomplish this? Eric
0
2161
by: Piet | last post by:
Hello wxPythoneers. I have a problem with a dialog box derived from wxFrame which has a wxComboBox as main element. Depending on the entry selected from the ComboBox, the dialog box will be populated with a number of controls. This works fine for the first selection of a combobox item, but subsequent selections from the combobox cause problems. This is because the event function for the combobox populates the sizer for the window with...
2
2303
by: Emiliano Molina | last post by:
This has been driving me crazy for a couple of days and I have finally narrowed it down to the following code. If the commented section is uncommented the drag and drop handler is never called. I have included the .xrc file for reference. Any help is greatly appreciated. An explanation would be great, but at the moment I would be eternally grateful for a workaround! Thanks in advance for those of you that spend some time helping out.
0
435
by: LutherRevisited | last post by:
wxpython.org's onlinedocs are down right now so bear with me. Here's my problem, currently I'm using a wxtextctrl to enter output in, I'm running out of rows with the wxtextctrl so I thought to use a listbox like I would in another language. I'm unsure how it is constructed or how to add items to it. Here is what I've done with the textctrl, I'm wanting to do something like this in the listbox: self.text_ctrl_4 = wx.TextCtrl(self, -1,...
0
1013
by: LutherRevisited | last post by:
I think I did a double post on WxListBox, my apologies, I wasn't seeing it show up and I didn't take into account the holidays...sorry.
2
1266
by: ishtar | last post by:
Hi I have strange problem... Background: I created some application using Linux which was intended to run on Mac OS X. There were few differences between Linux and Mac behavior of wxWidgets but finally after exchange of several screenshots i was able to finish it without even touching mac. BTW It was funny expirience. It was Mac OS 10.2 and everything was installed separetlly (wxPython,
1
2429
by: papafreebird | last post by:
I would like to save the contents of a wxListBox to a text file. Using borland c++ builder I am able to accomplish this by using the following code ListBox1->Items->GetText(); ListBox1->Items->SaveToFile(Edit1->Text + "\\gen_avs.bat"); This would save a text file with the contents of the listbox to a text file named gen_avs.bat How can I accomplish the same thing using wxWidgets wxListBox?
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.