flat assembler
Message board for the users of flat assembler.

Index > Windows > ListBox how get scroll position ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1770
Roman 27 Oct 2018, 06:09
In ListBox i have vertical scroll and text.
I want get scroll position and get current text from ListBox.

How get scroll position from ListBox ?
Or get all visible text from ListBox ?
Post 27 Oct 2018, 06:09
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 27 Oct 2018, 16:08
To get scroll position use GetScrollInfo on the listbox with SB_VERT (or SB_HORZ if your listbox is multi-column).

To get all "visible text", I assume you mean what's visible currently? Messages to send to listbox that could prove useful:

LB_GETTOPINDEX: gets the index of the top-most visible item.
LB_GETLISTBOXINFO: get the number of items per column (i.e. number of visible items on single-column listbox)

Then loop from LB_GETTOPINDEX, LB_GETLISTBOXINFO times, and retrieve the text via LB_GETTEXT of the specific item.
Post 27 Oct 2018, 16:08
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1770
Roman 27 Oct 2018, 17:20
Thanks. I try this.
I test. Work fine !
Post 27 Oct 2018, 17:20
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1770
Roman 28 Oct 2018, 10:23
I found this nice example to change ListBox style.
https://stackoverflow.com/questions/10487285/custom-listbox-scrollbar-style-issue

My question its do in resources section in winxpstyle.xml ?
Post 28 Oct 2018, 10:23
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 2493
Furs 28 Oct 2018, 12:24
Sorry, I haven't the slightest clue about any of that .xml stuff. Don't even know what it is.
Post 28 Oct 2018, 12:24
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1770
Roman 28 Oct 2018, 14:24
Post 28 Oct 2018, 14:24
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.