Re: [wxpython-users] wx.ListCtrl(), Report Mode, Editing Columns
by C M other posts by this author
May 9 2008 4:25PM messages near this date
Re: [wxpython-users] wx.ListCtrl(), Report Mode, Editing Columns
|
Re: [wxpython-users] wx.ListCtrl(), Report Mode, Editing Columns
On Fri, May 9, 2008 at 6:55 PM, Rich Shepard <rshepard@[...].com> wrote:
> On Fri, 9 May 2008, Robin Dunn wrote:
>
> > Or you can not use in place editing but instead popup a dilog when an item
> > in the list is activated (double clicked or Enter is pressed) that
> > contains the values to be edited. If the dialog is completed successfully
> > you can put the values back into the list ctrl.
>
> I think that I'm beginning to understand. First the row is
> highlighted/selected by a left click, then a double-click or the [Enter] key
> activates the entry. So, if EVT_LIST_ITEM_ACTIVATED occurs, then I call the
> dialog box ... and the column values somehow are placed in the appropriate
> text widgets?
I've just been doing a similar thing as Robin described and it is
working well. As far as your last question, I use these methods of
the listCtrl (in report mode) as shown in this half mocked-up
function:
def OnListCtrl1ListItemRightClick(self, event): #I use a right click
in this case
itemID = event.GetIndex() #you need the index to know which
listCtrl row to change
## A call to your dialog would go here to return the label text ###
listCtrl1.SetStringItem(index, 0, 'the label text') #could also
have an imageID if wanted
HTH,
Che
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Rich Shepard
Robin Dunn
Mike Driscoll
Rich Shepard
Rich Shepard
Robin Dunn
Rich Shepard
Robin Dunn
C M
C M
Mike Driscoll
Rich Shepard
Rich Shepard
Robin Dunn
Rich Shepard
|