Mike and others

THanks for all the listings about sample list boxes, etc.

But ya gotta walk before you can run and I'm clearly not getting something.

My form has a variable user defined list box

An on after start eep populates the list box from a SELECT:

CLS
SET SELMARGIN 1
SET VAR eBL = (CHAR(160))
SET HEADINGS OFF
OUTPUT DupInv.lff
SELECT +
(LJS(InvNum,20))=20, .eBL=1, (LJS(CTXT(ImpDOIN),14))=14, .eBL=1, +
(LJS(CTXT(ExistDOIN),14))=14 +
FROM InDupPik +
WHERE ImportID = .fImportID +
ORDER BY InvNum
OUTPUT SCREEN
PROPERTY DupPikListBox listitemsclear 'TRUE'
PROPERTY DupPikListBox load_from_file 'DupInv.lff'
SET HEADINGS ON

OK, now  I don't understand what's next looking at the samples.  I want the
user to be able to click on ONE item in the list (yes, just one), have that
item highlighted, and have the code return the unique ID (column InvNum) of
the item selected into variable eInvNum.

With just the above in place, I can't even click on an item and have it
highlighted!  Nice list, but no clicking has no result

The variable assigned to the list box is eInvInfo

What do I do?  An after click eep?

Please treat me as in the middle of a big DUHHH and clarify what to do - and
if you use any of the new property or getproperty commands, please specify
what they do. I'm still confused!

David Blocker
[EMAIL PROTECTED]
781-784-1919
Fax: 781-784-1860
Cell: 339-206-0261
----- Original Message -----
From: "MikeB" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, December 01, 2004 6:37 PM
Subject: [RBG7-L] - Re: ListBox Properties


>
> >Is there a property command that will move entries up and down in a
> >listbox?
>
> copy this code, click on the demo form and select paste, then run the form
and
> test it.  It moves 1 or more items up 1 in the list...
>
> object EnhancedSpeedButton2: TEnhancedSpeedButton
>   Left = 220
>   Top = 310
>   Width = 77
>   Height = 42
>   Caption = 'Move 1 Selected Item Up the List'
>   HotTrackFont.Charset = DEFAULT_CHARSET
>   HotTrackFont.Color = clWindowText
>   HotTrackFont.Height = -11
>   HotTrackFont.Name = 'MS Sans Serif'
>   HotTrackFont.Style = [fsUnderline]
>   NumGlyphs = 1
>   WordWrap = True
>   EEPNum = -1
>   CustomEEP.Strings = (
>     'SET VAR vcnt = NULL'
>     'SET VAR vtext TEXT = NULL'
>     'GetProperty lbcompany listcount '#39'vcnt'#39
>     'SET VAR vindex TEXT = '#39'0'#39
>     'SET VAR vtmpidx TEXT = '#39'0'#39
>     'WHILE (INT(.vindex)) <> (INT(.vcnt)) THEN'
>     '  SET VAR vchk = (INT(.vindex))'
>     '  PROPERTY lbcompany checkindex .vchk'
>     '  GETPROPERTY lbcompany selectedstate '#39'vsel'#39
>     '  IF vsel = '#39'TRUE'#39' THEN'
>     '    IF vchk <> 0 THEN'
>     '      PROPERTY lbcompany unselect .vchk'
>     '      SET VAR vtmpidx = (ctxt(((INT(.vindex)) - 1)))'
>     '      -- get the value of the current'
>     '      PROPERTY lbcompany itemindex .vchk'
>     '      GetProperty lbcompany selection '#39'vItem'#39
>     '      -- get the value of the item preceeding'
>     '      PROPERTY lbcompany itemindex .vtmpidx'
>     '      GetProperty lbcompany selection '#39'vText'#39
>     '      -- swap the values'
>     '      PROPERTY lbcompany itemindex .vchk'
>     '      PROPERTY lbcompany selection .vtext'
>     '      PROPERTY lbcompany itemindex .vtmpidx'
>     '      PROPERTY lbcompany selection .vitem'
>     '    ENDIF'
>     '  ENDIF'
>     '  SET VAR vindex = (CTXT((INT(.vindex)) + 1 ))'
>     'ENDWHILE'
>     'Getproperty lbcompany listcount '#39'vcnt'#39
>     'SET VAR vtext  = ('#39'ListBox "A" has'#39' & .vcnt &
'#39'Items'#39')'
>     'PROPERTY stxlb1 CAPTION .vtext'
>     ''
>     'Getproperty lbother listcount '#39'vcnt'#39
>     'SET VAR vtext  = ('#39'ListBox "A" has'#39' & .vcnt &
'#39'Items'#39')'
>     'PROPERTY stxlb2 CAPTION .vtext'
>     'RETURN')
> end
>
>

Reply via email to