Mike I read this explanation with interest.
What is the difference between the CHECKINDEX and ItemIndex properties? How is SELECTEDState different from SELECTION? 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 1:31 PM Subject: [RBG7-L] - Re: ListBox Properties > > > >How do I select the text at a certain index in a ListBox > > You have to position the mechanics of the listbox to the proper location > first.. Think of getting display data from a listbox in terms of a declare > cursor... The cursor declaration is like the Property <ComponentID> ItemIndex > .vSomeIndex and the Fetch part of it is the GETPROPERTY <ComponentID> SELECTION > 'vitem' which retrieves the Text of the Display item. > > SO insert the Property <ComponentID> ItemIndex .vChk > before the GETPROPERTY <ComponentID> SELECTION 'vitem' > and it should get it ok. > Note: If you have any trouble, then use a different variable for the ItemIndex > and convert it to type Text before using it like: > > set var vIndex text = null > set var vIndex = (ctxt(.vchk)) > > I am in the habit of using numbers passed as text because when you retrieve an > index number into a variable it comes back as type text, so that's how I pass > it back and it is reliable. The new Selection property was sent to me for > testing using Integers as arguments, so that's what I have been using with > them. > > PROPERTY <ComponentID> CHECKINDEX .vchk > GETPROPERTY <ComponentID> SELECTEDSTATE 'vsel' > Property <ComponentID> ItemIndex .vChk > GETPROPERTY <ComponentID> SELECTION 'vitem' > >
