News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Set scroll position

Started by Farabi, July 04, 2009, 05:08:40 AM

Previous topic - Next topic

Farabi

How to set the items position on a listbox ?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

ToutEnMasm


Quote
SBM_SETPOS
The SBM_SETPOS message is sent to set the position of the scroll box (thumb) and, if requested, redraw the scroll bar to reflect the new position of the scroll box.

Applications should not send this message directly. Instead, they should use the SetScrollPos function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the SetScrollPos function to work properly.


Farabi

Quote from: ToutEnMasm on July 04, 2009, 05:22:12 AM

Quote
SBM_SETPOS
The SBM_SETPOS message is sent to set the position of the scroll box (thumb) and, if requested, redraw the scroll bar to reflect the new position of the scroll box.

Applications should not send this message directly. Instead, they should use the SetScrollPos function. A window receives this message through its WindowProc function. Applications which implement a custom scroll bar control must respond to these messages for the SetScrollPos function to work properly.


Thanks, never notice an API will do it.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

Hi,
So I got a 7 listboxs but there are only one which is have a scrollbar, I want when the user scroll the bar on the scrollebared listbox the other lisbox position is changing too. How to do it?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

ToutEnMasm


There is a scrool bar when there is too much item to show.
if there is no scroll ber,you can try to change selections.

jj2007

Quote from: Farabi on July 04, 2009, 05:58:07 AM
Hi,
So I got a 7 listboxs but there are only one which is have a scrollbar, I want when the user scroll the bar on the scrollebared listbox the other lisbox position is changing too. How to do it?

So you want to have one listbox with, six without scrollbar, and they are supposed to scroll in parallel.
No idea if it is possible to use SetScrollPos without a scrollbar, but maybe you can hide the six, e.g. by catching the message that is supposed to make them visible??

Farabi

Quote from: jj2007 on July 04, 2009, 01:02:35 PM
Quote from: Farabi on July 04, 2009, 05:58:07 AM
Hi,
So I got a 7 listboxs but there are only one which is have a scrollbar, I want when the user scroll the bar on the scrollebared listbox the other lisbox position is changing too. How to do it?

So you want to have one listbox with, six without scrollbar, and they are supposed to scroll in parallel.
No idea if it is possible to use SetScrollPos without a scrollbar, but maybe you can hide the six, e.g. by catching the message that is supposed to make them visible??

How to hide the other 6 scrolbars? know something about this?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

sinsi

Have you tried ShowScrollBar yet? I'm not sure if it works for a listbox though.
Depending on what you're after you could use a ListView in report view.
Light travels faster than sound, that's why some people seem bright until you hear them.

Farabi

Quote from: sinsi on July 06, 2009, 09:42:28 AM
Have you tried ShowScrollBar yet? I'm not sure if it works for a listbox though.
Depending on what you're after you could use a ListView in report view.

:U Its work.
Now I will try to set the scroll position.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

Farabi

The scrollbar position is moving but the item is not following, anyone know why was that?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

sinsi

Maybe LB_GETTOPINDEX/LB_SETTOPINDEX ?
Light travels faster than sound, that's why some people seem bright until you hear them.

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

sinsi

Sweet  :U

heh, sometimes we are bloody psychic...
Light travels faster than sound, that's why some people seem bright until you hear them.