Page 1 of 1
How to scroll down ListIconGadget?
Posted: Mon Aug 30, 2010 2:22 pm
by sartic
..or give me universal method.
Re: How to scroll down ListIconGadget?
Posted: Mon Aug 30, 2010 2:34 pm
by Michael Vogel
Not sure, what you want to do (what about a code example?), but if you only like to ensure, that the selected line is visible, this line will help you:
Code: Select all
SendMessage_(#ListIconGadget,#LVM_ENSUREVISIBLE,GetGadgetState(#ListIconGadget)
Re: How to scroll down ListIconGadget?
Posted: Tue Aug 31, 2010 3:25 am
by USCode
If I understand what you want, and you need a cross-platform solution, you can use creatively use SetGadgetState() to select an item to move the visible portion of the item list.
Selecting an item moves the ListIconGadget list of items so as the selected item is visible.
Then you can select another item farther up the list or deselect the item altogether with SetGadgetState(#MyListIcon, -1).
If you play around with it a bit you'll get the feel for the behavior.
Re: How to scroll down ListIconGadget?
Posted: Tue Aug 31, 2010 7:57 am
by sartic
Michael Vogel wrote:Not sure, what you want to do (what about a code example?), but if you only like to ensure, that the selected line is visible, this line will help you:
Code: Select all
SendMessage_(#ListIconGadget,#LVM_ENSUREVISIBLE,GetGadgetState(#ListIconGadget)
I am learning pb as writing irc server/client as test of my skill.
I want to have list line of this gadget always visible.
This is interesting... I have no this command in help. But when i write it, editor wants 4th parameter?! Explain please
Re: How to scroll down ListIconGadget?
Posted: Tue Aug 31, 2010 7:59 am
by sartic
USCode wrote:If I understand what you want, and you need a cross-platform solution, you can use creatively use SetGadgetState() to select an item to move the visible portion of the item list.
Selecting an item moves the ListIconGadget list of items so as the selected item is visible.
Then you can select another item farther up the list or deselect the item altogether with SetGadgetState(#MyListIcon, -1).
If you play around with it a bit you'll get the feel for the behavior.
My program works just fine unde Wine (Linux). I didn't yet compile it for Lnx.
I will try this also.
Re: How to scroll down ListIconGadget?
Posted: Tue Aug 31, 2010 8:13 am
by sartic
SetGadgetState(#ListIcon_Chat,CountGadgetItems(#ListIcon_Chat)-1)
It works

I will test it more...
Sendmessage solution is only for Windows?
Re: How to scroll down ListIconGadget?
Posted: Tue Aug 31, 2010 11:56 am
by Michael Vogel
sartic wrote:SetGadgetState(#ListIcon_Chat,CountGadgetItems(#ListIcon_Chat)-1)
It works

I will test it more...
Sendmessage solution is only for Windows?
I fear, it is (never was keen enough to try programming on linux/mac)
Re: How to scroll down ListIconGadget?
Posted: Wed Sep 01, 2010 7:24 am
by sartic
I prefer Linux, but there is no market to sell your program. (Mac is also only few percent in my country)
It is nice to have Mac and Linux as compile option. I sell Lnx versions half price (but no go

If test go well i will buy pb; I need simple GUI for few project in near future.