Re: Scrolling a Window

new topic     » goto parent     » topic index » view thread      » older message » newer message

Don Phillips wrote:
> 
> Hellllo Ron... simple example:

Thanks, Don. I see how it works now... Ah... Sort of. I tried to get the
horizontal scrollbar working as well, but I don't see how to distinguish
between vertical and horizontal scrolling. My guess is that I'd be
dealing with WM_VSCROLL and WM_HSCROLL messages but they aren't
mentioned in any win32lib docs or examples I have on-hand (which is
likely most that are available). I'm further guessing that I'd have to
watch for an event coming through some message port or other, then see
which of the WM_xSCROLL messages it is. Am I on the right track? 

> ==========
> Win32Lib uses direct window objects for the windows and controls.

Ah, ha! That explains something. Originally I was using child windows
with a TextEdit control in each child window. Then I switched to putting
the TextEdit controls directly into the parent window and got rid of the
child windows. At some point after that I inadvertently passed the
WS_CAPTION flag to create() when building the TextEdit controls and they
all turned into little windows that could be moved. It's not a bug; it's
a feature!

> I have found that when Win32Lib processes
> something, it has the side effect of removing it from the direct
> callbacks (such as onKeyDown).

Okay. I was thinking it had to be something like that.

> If you want to capture the tab key, you need to use an onEvent handler
> instead.

Gotcha. Thanks again, Don.

> ==========
> Was clear enough for me =)
> Hope the examples are self explanitory enough for your use...

Good. Last time I asked a question on this forum I think I'd had too
much coffee... or maybe too little. Either way, I wasn't very
articulate.

Again, thanks.

-Ron T.

"User error. Replace user and try again." - Duane Eddingfield

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu