Restored from previous forum. Originally posted by Fangbeast.
Hi folks. I have a ListIconGadget full of items. The window is only a few inches high in my form and a lot of items are below the visible window.
When I search for objects (search and activate routine) and set them active so they are highlighted, is there any way to make the window scroll up automatically so the found and highlighted item is shown in the visible portion of the window?
Fangles
Making ListIconGadget visible automatically
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Paul.
Hey Fangs,
get the handle of your ListIconGadget:
hList=ListIconGadget(#gadget,10,10,400,150,"Test",100)
Now if you have say 50 items in the gadget and you want to focus on item 17 for example...
SendMessage_(hList,#LVM_ENSUREVISIBLE,17,0)
SetGadgetState(#gadget,17)
The SendMessage will move this item into view and the SetGadgetState will highlight it
Edited by - paul on 11 May 2002 08:15:00
Hey Fangs,
get the handle of your ListIconGadget:
hList=ListIconGadget(#gadget,10,10,400,150,"Test",100)
Now if you have say 50 items in the gadget and you want to focus on item 17 for example...
SendMessage_(hList,#LVM_ENSUREVISIBLE,17,0)
SetGadgetState(#gadget,17)
The SendMessage will move this item into view and the SetGadgetState will highlight it
Edited by - paul on 11 May 2002 08:15:00
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Fangbeast.
:)
Fangles
Ahh, you little beauty, got it all stuffed into place and working. Send the bill to my daughterHey Fangs,
get the handle of your ListIconGadget:
hList=ListIconGadget(#gadget,10,10,400,150,"Test",100)
Now if you have say 50 items in the gadget and you want to focus on item 17 for example...
SendMessage_(hList,#LVM_ENSUREVISIBLE,17,0)
SetGadgetState(#gadget,17)
The SendMessage will move this item into view and the SetGadgetState will highlight it
Edited by - paul on 11 May 2002 08:15:00
Fangles
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Fangbeast.
Fangles
You know, for someone who isn't dead, Paul is an amazing living legend:)I'm amazed what knowledge some of you have stored in the pocket.
Great to know that
Have a nice day...
Franco
Sometimes you have to go a lonely way to accomplish genius things.
Fangles