473,395 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

wxGrid

Subsciber123
Hi,
I'm using Python 2.6, and I'm trying to write a gui program that uses wxGrid. I have made it so that the columns can be dragged around to different locations, but I need to bind to an event that tells me when they are moved, and which one moved where. Can anybody help me with this? I don't see any events that jump out at me as being relevant.

Thanks.
Jun 30 '09 #1
3 3106
This problem turns out to be even more annoying than I thought.

I just realized that when you drag a column to a different position (say column zero) it retains the same column number (i.e. zero).

I guess that the question now is, if you have a column, how do you tell whether it is to the right or the left of another column within wxGrid?

An event to tell me when someone drags a label around would still be nice.
Jun 30 '09 #2
Ah. It's wxGrid.GetColPos()

Okay, what about that event? I need to know when the column position changes.

Thanks in advance.
Jun 30 '09 #3
So far, I've used a dirty hack. I've created a timer with events, and as soon as someone clicks on the title, it starts the timer. When someone drops the title, the next timer event stops the timer and I can make the program do what I want it to do. So much for good form. At least I'm not using threads.

Please post if you have a better way of doing it.
Jul 1 '09 #4

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...
1
by: matthiasjanes | last post by:
dear all, I just need a little help. could anyone give real code example (simple) how to read the value of a grid cell. i could not figure it out and really would like to do a simple...
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
1
by: Sam the Cat | last post by:
using "from wxPython.wx import *" under python2.3 I cannot seem to find the wxGrid class -- it says its undefined -- am I missing something obvious ? I know the globalspace import is not the best,...
0
by: fowlertrainer | last post by:
Hi ! I have a little problem with wxGrid. In Delphi I can set in grids how I want to select cells. I can select only individual cells, or ranges. In my program I don't wanna use ranges. But I...
10
by: lux | last post by:
Hi, How can I capture the EVT_SET_FOCUS on a wxGrid? Tank's in advance Luca
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
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
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...

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.