Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editable Listbox?
Message
 
 
To
27/01/2003 13:51:12
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00745902
Message ID:
00745994
Views:
21
Mike,

You can tell what item is the first one displayed in the lst using TopIndex. ListIndex gives you the currently selected item, the delta between the two can tell you how far down from .Top that you should display your new form.

>I'm trying to create/simulate a listbox that can be edited.
>
>In a nutshell, I've put a standard listbox control on a form (frmA) along with a command button. When the button is clicked, I know that the contents of the currently selected listbox item is to be modified. I display a borderless form (frmB) without a title bar that contains a textbox in which the listbox's content can be changed. The idea is to make a textbox appear on top of the listbox at the listbox's selected item's position. This all works fine except I can't figure out how to determine the vertical offset at which to display frmB (with the textbox) on top of frmA.
>
>Does anyone know how to determine the coordinates of the selected item in a listbox? What would be nice would be properties similar to a grid's relative row and rowheight from which the top property of frmB can be determined. In case you are wondering, yes, I do the same for a grid and it works great. In case you are wondering why I do this for a grid...that's another topic :)
>
>Any suggestions and/or comments are appreciated
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform