Hi Paul,
I've just started using this control too, and found that same problem.
Carlos Alloatti is already aware of this problem, and for this moment, I did
the following to fix this small bug.
Carlos is not available this week, and he promised to send a new version as
soon as he gets back.
For now, you can do one of the following solutions:
1 - Create a new method, "ResetScrollBars", and add the following code:
If This.ControlCount > 0 And This.Controls(1).BaseClass = [Image]
With This.Controls(1)
This.nOriginalWidth = .Width
This.nOriginalHeight = .Height
This.nZoomIndex = This.nDefaultZoomIndex
ShowScrollBar(This.nHCtlHwnd, SB_CTL, 0)
ShowScrollBar(This.nVCtlHwnd, SB_CTL, 0)
This.ctl32_Resize()
If This.ctlVEnabled Then
This.ctlVVAlue = 0
Endif
If This.ctlHEnabled Then
This.ctlHValue = 0
Endif
Endwith
This.ctlZoom = 100
Endif
So, after you change the WIdth or Height properties of your SContainer, just
call the above method, and it's done.
2 - The better way, and probably how it will be fixed:
a - in method Ctl32_BindEvents, add the following code at the end;
*!* Control Resizement
Bindevent(This.Controls(1), Width, This, EvtHandler_Size, 1)
Bindevent(This.Controls(1), Height, This, EvtHandler_Size, 1)
b - Create a new method, and call it "EvtHandler_Size" and put this code in
it:
With This.Controls(1)
This.nOriginalWidth = .Width
This.nOriginalHeight = .Height
This.nZoomIndex = This.nDefaultZoomIndex
ShowScrollBar(This.nHCtlHwnd, SB_CTL, 0)
ShowScrollBar(This.nVCtlHwnd, SB_CTL, 0)
This.ctl32_Resize()
If This.ctlVEnabled Then
This.ctlVVAlue = 0
ENDIF
If This.ctlHEnabled Then
This.ctlHValue = 0
ENDIF
ENDWITH
This.ctlZoom = 100
This way, the control will automatically update its scrollbars when width or
height are changed.
Hey Mal, I've already put all those codes
What do you think of this solution ?
Regards
Cesar
----- Original Message -----
From: "Paul Newton" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2007 10:12 PM
Subject: ctl32 scrollable container
> Hi all (Malcolm are you there ?)
>
> I have just been looking at the ctl32 scrollable container and I have
> one small problem with it
>
> Scrollable container height is say 600 and it has a child container of
> height (e.g.) 1200. Using ctlforcescrollbars = 2. The slider of the
> vertical scrollbar is about half the height of the scrollbar itself,
> which is great.
>
> If I now (at runtime) increase the height of the child container to say
> 2400, the size of the slider remains the same UNTIL the mouse moves over
> the scrollbar at which point the slider resizes appropriately.
>
> I would like to find a way to force the resize of the slider without the
> need to move the mouse over the scrollbar.
>
> Any suggestions ? Workarounds ? Kludges, even <g> ?
>
> Thanks
>
> Paul Newton
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.