Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighted ID in a List Box

Status
Not open for further replies.

foxprogram

Programmer
Aug 31, 2004
28
0
0
HU
How can I get the relative number of the highlighted row ?

.ListIndex tells only the selected item index, but I need to know the highlighted row position only in the selectable area ...

 

Do you mean you want to know the item number,relative to the top of the control, after you have scrolled the top-most items out of site?

If so, I don't think that's possible.

Why do you need to know this?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Yes.

Because I cannot use treeview ActiveX control, that is use 16x16 16c icons only, but I need to use large images to switch on/off items in a list(?) box. I've tough that i should take some push buttons near the list box object, and the same line and the same time as the higlighted row in the list box, list box interactivechange method should able to enable a button... Stupid idea :(
 
This a screenshot about my list box object :


It is working fine if the user click twice in a row ( the whole list will be cleared, then it will be filled with only the chosen part numbers ).

I should use a plus sign somewhere which the user should click onto once and then the choosn parts would be in the detail list.

I just put now the signs with paint application, list box object contains only the imagines as a .picture property of it.

Any idea ?
Alternative way ? Grid ? Treeview ? ???
 

Are you sure you can't use large icons in a treeview? I would have thought it would be no problem (but I've never tried it).

Another possibility: Why not just have a single + and - button, and let it apply to whichever item is currently highlighted? The + button could open a separate control for viewing the details.

Or, you could let the user double-click on an item in the listbox to view the details.

Just off the top of my head ...

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Because I cannot use treeview ActiveX control, that is use 16x16 16c icons only

Sorry, but this is not true.

You can set up the ImageList control to use 32x32, 48x48 or custom sized images. The problem here is that you must set the image size before you add the images to the ImageList.



Marcia G. Akins
 
The TopIndex property should help you figure out what's currently displayed in a listbox.

Tamar
 
I try to solve the problem with Treeview control.

What Ihave to write here :

x=thisform.oletreeView.nodes.Add("R",4,"C"+alltrim(STR(i)),malbumnev,thisform.Imagelist.__________)

to load an image to the actual node ?
(I loaded images before, into the Imagelis control)


 

Set the fifth parameter of the Add method to either the numeric index of the image within the ImageList, or to its alphanumeric key. You don't need to reference the ImageList itself at that point.

For example:

x=thisform.oletreeView.nodes.Add("R",4,"C"+alltrim(STR(i)),malbumnev,3)

This will assign the third image to the node being added.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top