[Gambas-user] does listview.item.selected=true do same as listview_click?

richard terry rterry at ...1822...
Tue Apr 1 07:09:44 CEST 2008


On Tue, 1 Apr 2008 03:38:12 pm jbskaggs wrote:
> I noticed with my perpetual file problems- that I needed to track down each
> step of the program.
>
> I discovered that every time listview.item.selected=true occurred it had
> the same affect as if I clicked on it- because it ran listview_click every
> time it occured.
>
> IN my ignorance and misunderstanding of the doc I thought it meant only to
> highlight the list.item.
>
> Am I understanding that properly now? listview.item.selected=true does same
> as listview_click?

The list_select event seems to be triggered as soon as the user clicks on a 
list and has selected a row, however the row he clicked on is not necessarily 
matched by the internal pointer to the lists data.

If you set the item to selected it just means the the current item is the one 
in the list you have selected, and in this event I've just moved the current 
internal pointer of the list to match what the user has selected on the 
screen. (.movecurrent).

If there was no code attatched to the list_click event, nothing would happen.  
What you do with the click event is up to you.

At least that's my experience, but others may correct me.




>
> JB SKaggs






More information about the User mailing list