1. scroll bars not rolling text
- Posted by sergelli Feb 22, 2014
- 1307 views
I need to put the contents of a text file in a "LText" window
Something like:
MBOX = create( Ltext, WinMain, Center, Center, 600, 800, w32or_all ({WS_HSCROLL, WS_VSCROLL})) setText (MBOX, List1)
The scroll bars are appearing, but are not rolling text.
We have an example?
What should I do to make scroll bars work?
2. Re: scroll bars not rolling text
- Posted by andi49 Feb 22, 2014
- 1286 views
I need to put the contents of a text file in a "LText" window
Something like:
MBOX = create( Ltext, WinMain, Center, Center, 600, 800, w32or_all ({WS_HSCROLL, WS_VSCROLL})) setText (MBOX, List1)
The scroll bars are appearing, but are not rolling text.
We have an example?
What should I do to make scroll bars work?
Hi
Static Controls (like LText) do not respond to the most of the Windowmessages.
So they ignore your scrolling bars.
This is not a problem with win32lib this is inside the win32api.
You may try something like this:
atom MBOX = create(MleText, "", MyWindow, Center, Center, 600, 800, w32or_all ({WS_HSCROLL, WS_VSCROLL,ES_READONLY})) setText (MBOX, List1)
This gives you an Editbox that you can't edit ;), but you can still select Text in it.
Maybe not the best solution but the only (easy to realize) one i know.
Andreas
3. Re: scroll bars not rolling text
- Posted by LarryMiller Feb 22, 2014
- 1292 views
From what I understand static controls can have scroll bars but they will be non-functional. You would need to subclass the static control and handle the scrollbar messages to make this work.
The easiest solution would be to use a read-only edit control instead of a static.
4. Re: scroll bars not rolling text
- Posted by sergelli Feb 23, 2014
- 1254 views
Thanks Andreas and Larry
The lesson was very good :)