473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Renaming columns wxGrid

3 New Member
Hey All,
I'm relatively new to Python and i need some help. I've created a GUI with wxPython and it has a grid. The columns in the grid are labelled when created but how would i change the labels of the grid during runtime? At the moment it displays the months of the year and when the user wants to see more detail it needs to show days of the year etc.

I'm using Python 2.5 and wxPython 2.8.1 on WinXP.

Any suggestions?

Many thanks

Ayesha
Mar 11 '07 #1
4 1518
bartonc
6,596 Recognized Expert Expert
Hey All,
I'm relatively new to Python and i need some help. I've created a GUI with wxPython and it has a grid. The columns in the grid are labelled when created but how would i change the labels of the grid during runtime? At the moment it displays the months of the year and when the user wants to see more detail it needs to show days of the year etc.

I'm using Python 2.5 and wxPython 2.8.1 on WinXP.

Any suggestions?

Many thanks

Ayesha
Hi Ayesha. Welcome to TheScripts. This is an easy one:
Expand|Select|Wrap|Line Numbers
  1. myGrid.SetColLabelValue(colNum, "New Label")
If you need any help at all just ask. It's OK to post code too, as long as you use code tags (as I have here). When you hit reply, you'll see what the text looks like. Thanks for joining, and keep posting.
Mar 11 '07 #2
bartonc
6,596 Recognized Expert Expert
Hi Ayesha. Welcome to TheScripts. This is an easy one:
Expand|Select|Wrap|Line Numbers
  1. myGrid.SetColLabelValue(colNum, "New Label")
If you need any help at all just ask. It's OK to post code too, as long as you use code tags (as I have here). When you hit reply, you'll see what the text looks like. Thanks for joining, and keep posting.
I forgot to mention that the "#" icon at the top of the editor window inserts code tags for you. Use Enhanced Mode, hit the # button, paste your code and then hit the # button again. Enjoy!
Mar 11 '07 #3
ayebegum
3 New Member
Thanks for the suggestion - i did try that actually and it wasn't working which was why i posted. But i have since realised it was because of bug somewhere else in my code. But thank you for your help!

Ayesha
Mar 15 '07 #4
bartonc
6,596 Recognized Expert Expert
Thanks for the suggestion - i did try that actually and it wasn't working which was why i posted. But i have since realised it was because of bug somewhere else in my code. But thank you for your help!

Ayesha
You are welcome. Any time you need Python help, just post.
Mar 15 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tom Lee | last post by:
# # Python 2.2.3, wxWindows/wxPython 2.4.1 # # The code: # from wxPython.wx import * class TestFrame( wxFrame ): def __init__( self ):
6
by: Johnny Geling | last post by:
I would like use custom labelnames for rows in the wxGrid which I use through wxpython. The SetRowLabelValue from wxGridTableBase isn't doing anything. Is it posible to use custom rowlabels same...
0
by: Kepes Krisztian | last post by:
Hi ! My problem is that: 1.) I want to create a frame with some buttons, and client area. If the user clicked on a button, the procedure create components on client area, and show results.
0
by: marvin | last post by:
hi- i worked on a project in TCL/TK found at j_m_mc.tripod.com. I want to allow the user to edit the table using wxGrid and python. I'm just looking for some tips. For i.e. in sqlite and TCL...
4
by: Piet | last post by:
Hello. I am working on an XML editor that will not display the xml file as plain text, but will rather work with a combination of a tree view for the main element nodes and some kind of tabular...
1
by: James | last post by:
wxpython 2.5.3 hi, anyone know how to make a multiline cell editor for wxgrid? thank you :) best regards, James
4
by: Steve Jorgensen | last post by:
The previous post regarding dependencies reminded me of another bugger I come up with from time to time. SQL Server allows us to rename objects via a system stored procedure (I usually use an ADP...
1
by: Don Leverton | last post by:
Hi Folks, I have been given a CD with approx 130 .xls files (bean-counters!) that I would like to import and merge to ONE table (tblTradeshow). The XL files are *similarly*, but not...
10
by: lux | last post by:
Hi, How can I capture the EVT_SET_FOCUS on a wxGrid? Tank's in advance Luca
0
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,...
0
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...
0
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...
0
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...
0
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 ...

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.