[Gambas-user] Can yu show me how to do this?

Stefano Palmeri rospolosco at ...152...
Fri Apr 4 22:03:14 CEST 2008


Alle 21:12, venerdì 4 aprile 2008, jbskaggs ha scritto:
> On a list view:
>
> When I call a list view from another form (ie to get from or add to) my
> list goes to the first item and runs to the last end and my searches do
> exactly what they are suppossed to.
>
> How though do I get back to the original item the listview was own when it
> was called?
>
> In other words:
>
> A list has fours items.  I click on item three and pull up an associated
> file.  Then when that file closes a command to click the listview occurs
> and it goes thru and adds up all the data on the list.
>
> But then I end up at the bottom of the list how do I get back to the Item I
> started on?
>
> JB

First declare a string to store the item key you click on:

PRIVATE $sKeyToGoBack AS String

then when you click on item three do:

$sKeyToGoBack = ListView1.Current.Key

...here you do what you want to do....

then you want to go back to item three. so do:

ListView1[$sKeyToGoBack].Selected = TRUE


Ciao, 

Stefano









More information about the User mailing list