Custom scrollbars

Hi,

I'm trying to implement a rather complicated feature for an app I'm
developing. The requirement is "skinnable" scrollbars. This is fairly
complicated in itself, but I've gotten most of it working. The
show-stopper at this point is that I need to know the total size of the
window to be scrolled so I can set the virtual size of the panel it sits
on and use that to calculate various things for the scroll bar. For
testing, I'm just setting the virtual size to something ridiculous (say,
5000 x 5000) and most things seem to work okay (with the obvious
exception that the scroll region doesn't match the area of the child
window).

To further complicate matters, the target window to be scrolled is an
embedded HTML browser (in this case iewin) which I apparently have no
way of calculating the total size for.

Anyway, my plan, if I can work this part out, is to set my virtual size
to slightly larger than the size needed for the child (to prevent that
window's scrollbars from appearing) and manage the scrolling myself.
Obviously, without being able to calculate the required size for the
child window this won't work.

Any suggestions? One possibility that I've dead-ended on is to setup a
hidden scrolled window and use that to manage the visible child but I'm
having difficulty associating them in order to take advantage of the
automatic calculations done by wx.ScrolledWindow.

Any comments/help appreciated.

Regards,
Cliff

···

--
Cliff Wells <clifford.wells@comcast.net>

Cliff Wells wrote:

Anyway, my plan, if I can work this part out, is to set my virtual size
to slightly larger than the size needed for the child (to prevent that
window's scrollbars from appearing) and manage the scrolling myself. Obviously, without being able to calculate the required size for the
child window this won't work.

Any suggestions?

It depends on the nature of the target window. If it has a sizer or a minsize set, or otherwise has a useful DoGetBestSize then you can use GetBestFittingSize to find out how big it wants to be.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Well, I got my scrollbars functioning for everything *but*
iewin.IEHtmlWindow (which is actually what I need). It doesn't appear
that it supports the notion of a best size nor does it seem possible to
extract its virtual size.

I looked at the Microsoft documentation for this control and I don't see
anything that's going to help. Adding insult to injury, the ActiveX
Mozilla control copies the interface to the IE control, so there's not
much for an alternative embedded browser at this point.

Any more suggestions or should I write this off as a lost cause?

Regards,
Cliff

···

On Thu, 2004-08-26 at 12:33, Robin Dunn wrote:

It depends on the nature of the target window. If it has a sizer or a
minsize set, or otherwise has a useful DoGetBestSize then you can use
GetBestFittingSize to find out how big it wants to be.

--
Cliff Wells <clifford.wells@comcast.net>

Cliff Wells wrote:

···

On Thu, 2004-08-26 at 12:33, Robin Dunn wrote:

It depends on the nature of the target window. If it has a sizer or a minsize set, or otherwise has a useful DoGetBestSize then you can use GetBestFittingSize to find out how big it wants to be.

Well, I got my scrollbars functioning for everything *but*
iewin.IEHtmlWindow (which is actually what I need). It doesn't appear
that it supports the notion of a best size nor does it seem possible to
extract its virtual size.

I looked at the Microsoft documentation for this control and I don't see
anything that's going to help. Adding insult to injury, the ActiveX
Mozilla control copies the interface to the IE control, so there's not
much for an alternative embedded browser at this point.

Any more suggestions or should I write this off as a lost cause?

I can't think of anything to try. Sorry.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!