1. scroll bars not rolling text

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?

new topic     » topic index » view message » categorize

2. Re: scroll bars not rolling text

sergelli said...

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: scroll bars not rolling text

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.

new topic     » goto parent     » topic index » view message » categorize

4. Re: scroll bars not rolling text

Thanks Andreas and Larry

The lesson was very good :)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu