1. RE: [Win32Lib] setting range for window scrollbar; & bug in

Hi Dan,
 
> Since its unclear how to use the parameter "pageSize" in
> "setWindowScrollRange", 

I've figured it out. There was a bug in that although this routine set the
SIZE of the thumb on the scrollbar it didn't effect the AMOUNT of scrolling
that was done. This is fixed now.

>I thought to maybe use the other procedure,
> "setScrollRange", since it's got a test for if the id sent to 
> it is a window
> or a scroll control, ie,
>     if window_type [ id ] = Window then
>         lMsgCode = SB_VERT                    -- vertical control
>     else
>         lMsgCode = SB_CTL                     -- scroll bar control
>     end if
> 
> However, in the next lines, when it goes to use the function, 
> it ignores
> that setting of lMsgCode, I think, by hard-coding SB_CTL into it:
> 
>     VOID = w32Func( xSetScrollInfo,
>          {   getHandle( id ),            -- handle
>          SB_CTL,                     -- scroll bar control
>          sif,                        -- pointer to structure
>          0 } )                       -- redraw flag
> 
> which seems to mean I can't use it after all (in this form).  
> Is this a bug?

Yep. That's a bug. Its fixed now.

> 
> ------------------------------------------------------
> 
> And I have a suggestion regarding "setWindowScrollRange":  if that
> "pageSize" parameter is still an unresolved question, then 
> maybe make the
> procedure *without* it, (since "setScrollRange" does so 
> anyway), which would
> allow it to be used to set both horiz & vert windows 
> scrollbars (at least it
> looks like it's supposed to), and then if desired, make an
> "setWindowScrollRangeEX" to include the "pageSize" option?

Not needed now that I figured out how it all works.
 
> -------------------------------------------------------
> 
> I did think to try to re-wrap the "setScrollInfo", for both 
> horiz & vert
> scrollbars, but found that there's a non-global var, 
> "window_range" utilized
> in the existing "setScrollRange" that I'm using as an example 
> that I can't
> therefore properly set.

I've done heaps of changes in the scrolling area because of your inquiry.
All the routines now suport both vertical and horizontal Window scrollbars,
plus the scroll event now gets more details, like the type of scroll event
and which Windows scroll bar it took place on. I've reworked the ex12b demo
to use scrollbars too. I'll release the whole lot this weekend.

------------
Derek.

==================================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
==================================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


==================================================================

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu