Listbox selections

Listbox selections

Postby Ross_ValuSoft » Wed May 02, 2012 8:33 am

Hi everyone.

I have an application that stores the results of electrical safety tests on items in a hotel room, eg lamp, TV, hair dryer etc.

Sometimes the user puts the wrong tags on two items and wants to swap the results for the tag numbers. I show him all the results in the rows of a listbox. How can I highlight 2 rows in a listbox? If I can highlight 2 rows I can then simply use a button action to swap the tag numbers.

Thanks for your help.

Cheers,

Ross
User avatar
Ross_ValuSoft
 
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Listbox selections

Postby Enrico Maria Giordano » Wed May 02, 2012 2:10 pm

Do you mean Windows standard listboxes or FWH browses?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8243
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Listbox selections

Postby Ross_ValuSoft » Wed May 02, 2012 3:01 pm

Thanks for your reply Enrico .... and happy birthday!

I display the candidates like this in my FWPPC application under Windows Mobile 6.5 ...
Code: Select all  Expand view

        @ 20, 8 ListBox oLst ;
       Fields IIF( (ITEM_IN->RESULT == "5"), hFailed, ;
                 IIF( (ITEM_IN->RESULT == "6"), hvisual , ;
                 IIF( ( (ITEM_IN->RESULT == "2") .OR. ;
                        (ITEM_IN->RESULT == "3") .OR. ;
                          (ITEM_IN->RESULT == "4") ), hMoney, "" ) ) ) ,;
       ITEM_IN->SITE, ITEM_IN->LOCATION, ITEM_IN->Number, ITEM_IN->TAG_NUMB, ;
        IIF( empty( ITEM_IN->ITEM ), ITEM_IN->OTHER, ITEM_IN->ITEM ), ;
        IIF( ( val( ITEM_IN->Category ) < 8 ), aClasses[ val( ITEM_IN->Classes ) ], " " ), ;
        IIF( ( val( ITEM_IN->Category ) < 8 ), aFrequency[ val( ITEM_IN->Frequency ) ] , "Yearly" ) ;
       Alias "ITEM_IN" ;
       FieldSizes 18, 30, 40, 30, 50, 100, 100, 100 ;
       Headers '', 'Site','Where', '#', 'Tag', 'What', 'Class', 'Frequency' ;
       Size 240-20, 200-10 ;
       Pixel
 

Hmmm, that didn't paste very neatly, but hopefully it makes sense.

Should I just use an "ON DBLCLICK" clause to do it perhaps?

Cheers,

Ross (heading to bed now at 1 am)
User avatar
Ross_ValuSoft
 
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Listbox selections

Postby Enrico Maria Giordano » Wed May 02, 2012 4:44 pm

It's a TWBrowse. Sorry, I think it's not possible to select more than one row.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8243
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Listbox selections

Postby Enrico Maria Giordano » Wed May 02, 2012 4:45 pm

Ross_ValuSoft wrote:and happy birthday!


Thank you! :-)

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8243
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Listbox selections

Postby Ross_ValuSoft » Fri May 04, 2012 2:16 pm

Many thanks Enrico.

I read your answer and did not understand it. But I knew that you must be saying something very important ... so I then went and examined the source code for listbox and then the contents of fwce.ch and yes there it was in front of my nose ... a listbox using a dbf gets translated into a twbrowse and cannot use multiple selections. If it is a listbox of array elements then multiple selections can be made.

So now I must load my dbf file into an array, or ... is there some other way using FWPPC 10.2 of February 2010?

If I am correct this was the last release of FWPPC ... and probably will not be updated.

Best wishes,

Ross
User avatar
Ross_ValuSoft
 
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 10 guests