473,569 Members | 2,555 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding a DB regs to a wx listbox

Hi, I need add to a listbox a list of items extracted from a database.
This is that I've do:

class tasques(wx.Fram e):
def __init__(self, *args, **kwds):
.....
self.list_box_1 _copy = wx.ListBox(self , -1, choices=[],
style=wx.LB_SIN GLE|wx.LB_ALWAY S_SB)
....

How I add the list to choices?

Jun 12 '07 #1
1 1520
self.list_box_1 _copy.Append( your_item )

In the wxWidgets help:

http://www.wxwidgets.org/manuals/2.8...ntrolwithitems

And in the wxPython help:

http://www.wxpython.org/docs/api/wx....ner-class.html

Regards,
- Jorgen

On 6/12/07, Marcpp <ma****@gmail.c omwrote:
Hi, I need add to a listbox a list of items extracted from a database.
This is that I've do:

class tasques(wx.Fram e):
def __init__(self, *args, **kwds):
....
self.list_box_1 _copy = wx.ListBox(self , -1, choices=[],
style=wx.LB_SIN GLE|wx.LB_ALWAY S_SB)
...

How I add the list to choices?

--
http://mail.python.org/mailman/listinfo/python-list
Jun 12 '07 #2

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

Similar topics

5
8170
by: rahul8143 | last post by:
hello, I want to know for what purpose union REGS and struct SREGS are used in windows programming? also how following code an determine that running OS is windows? in_regs.x.ax = 0x160A; int86x(0x2F, &in_regs, &out_regs, &seg_regs); if (out_regs.x.ax == 0) Running_WIN=TRUE; provided here union REGS in_regs, out_regs;
2
23343
by: John R. | last post by:
I want to have a listbox that shows a checkbox and a textbox. I created a user control that has a checkbox and a textbox in it and have been trying to add it to a listbox but I can't get it to show up for each item I add to the listbox. foreach (Column column in columns) { ColumnsListBox.Items.Add(column.Name);...
3
4334
by: Husam | last post by:
Hi EveryBody: I made project by Vb.Net which consist the following items: 1\ Textbox 2\Button 3\Listbox When you write any thing in the textbox and press the button any text written in the textbox will be added to the listbox, but i figure that when
6
3651
by: Papa.Coen | last post by:
I've just spend a lot of time solving the following problem: I used dotNet 2.0 / Visualstudio 2005 / C# / aspx, enable viewstate is set on all controls. I have 2 listboxes; the left contains items that can be (dynamically) added to the right box. Adding the first item went fine, it shows up in the right box. Adding the second item resulted...
14
18673
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe is that as more and more are added, population of the list box takes longer and longer. ie the first 10th of the item set are added much much...
1
12759
by: bill | last post by:
I need to be able to dynamically add items to a <asp:listbox> (or HTML <select runat=server>) using clientside javascript, and retrieve the items when the page is posted back. I use this code to add the option to the listbox. It works for <select> or <asp:listbox> controls. var opt = document.CreateElement("OPTION"); opt.text = "test";...
5
9643
by: kushmanr | last post by:
hi i am having to problems: interrupt decleration doesn`t compile: void _interrupt _far terminal_isr() ....... _dos_setvect(0xC,terminal_isr) : error C4226: nonstandard extension used : '_far' is an obsolete keyword : error C2061: syntax error : identifier 'terminal_isr'
2
2961
by: =?Utf-8?B?TWFobW91ZCBTaGFiYW4=?= | last post by:
i have a problem in adding new listbox items i don't need to allow adding multible items with the same textvalue ex: if current items are: green red
4
2758
by: ranjini ns | last post by:
Hi, I have a form, and in this form, there are 2 drop down list a text box, one button (labelled "add" )and finally, a listbox. The question is, when the user clicks on the add button, how do I add the value selected in the drop down list and the text box values and put it into the listbox? After adding to the listbox, the selected value...
0
7701
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7615
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...
0
8130
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...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
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...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2115
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
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
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...

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.