[Gambas-user] Help about use table view editing with Return key

Benoît Minisini gambas at ...1...
Sun Sep 19 17:48:18 CEST 2010


> Hi,
> 
> I created a TableView with three columns.
> First, I wrote code so that when user double-click the cell at third column
> on a row, the cell start the editing. My program worked fine.
> Then I added code so that when the user click the cell at the first column
> on a row, this row would be removed. The removing worked fine. But with the
> editing, when I pressed Enter (Return) key to finish the editing, some rows
> were removed.
> 
> I can't find where I'm wrong. Please help, thank you!

The more important question: Why are you using 7zip ? :-)

TableView is designed so that editing is started on click. So, using the arrow 
keys or the Enter keys makes the TableView moves the current cell 
automatically and raise Click events.

If you want another behaviour (like editing on double-click but remove on 
click), then I think you should write your own TableView.

Yet again, DblClick is a low-level event, and Click is not, and it is not 
necessarily comes from a low-level mouse event. The name "Click" is badly 
chosen, it comes from Visual Basic.

Regards,

-- 
Benoît Minisini




More information about the User mailing list