[Gambas-user] TableView -Multi-Mode- Get Selected rows

Arief Bayu Purwanto arief at ...846...
Thu Feb 17 13:22:34 CET 2005


> > 
> >Hello List members 
> > 
> >I'm trying to set up an app to access a mysql-database. Everything 
went 
> fine  
> >so far. 
> > 
> >Now I ran into a problem: 
> >I made a dialog in modal mode, where I want the user to select 
items from 
> 
> a  
> >list (represented by a tableview widget). 
> >It should be possible to select multiple items at once (The dialog 
will 
> than  
> >pass back an integer[] with the corresponding id's from the 
selected 
> items) 
> > 
> >So I set the tableview mode to "multi". Fine: I can do mutliple 
> selections. 
> > 
> >_But: How can I read from the tableview widget, which rows are 
selected?_ 
> 
> > 
> >In "single" mode it's easy: I just have to read the tableview.row 
> variable. 
> >How do I get the needed information in "multi" mode? 
> > 
> >regards, 
> >Thomas 
> > 
> Salut Thomas, 
>  
> for shure it is not easy to find in help. 
> You have to look at .TableViewRow , there you find Selected .   
> You use it like that. 
>  
> PUBLIC SUB Button2_Click() 
> DIM ni AS Integer 
> FOR ni =0 TO  tbvSelect.Rows.Count - 1 
>   IF tbvSelect.Rows[ni].Selected THEN 
>     PRINT ni 
>   ENDIF 
> NEXT 
> END 
>  

To pass the value to another form, you could use like HTTPget Example 
(Using global class).
> Amicalment 
> Charlie 
> * Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real 
users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- Arief Bayu Purwanto
   http://silentstudio.net/ <Sorry, my english bad (I'm Indonesian)>





More information about the User mailing list