wxGrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Subsciber123
    New Member
    • Nov 2006
    • 87

    wxGrid

    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.
  • Subsciber123
    New Member
    • Nov 2006
    • 87

    #2
    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.

    Comment

    • Subsciber123
      New Member
      • Nov 2006
      • 87

      #3
      Ah. It's wxGrid.GetColPo s()

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

      Thanks in advance.

      Comment

      • Subsciber123
        New Member
        • Nov 2006
        • 87

        #4
        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.

        Comment

        Working...