Hi Paolo,

Could you tell us:
1. Which company are you working for?
2. What type of license are you using?
3. What kind of application are you developing with ULC?

We strongly recommend that you buy support.

To know that a component is visible in a ULCScrollPane, you will need an
extension.

There are two ways of doing it:

1. When a component becomes visible upon scrolling, it gets painted. So you
can override that component's paint() method and do your special stuff.


2. On the client side you can install an AdjustmentListener on the scroll
bar. Then whenever the scrollbar moves, the listener will be fired. In the
listener, you can get the bounds or location of the contained component in
scrollpane  and check if it lies in the viewport's rectangle:

            Rectangle visibleR = scrollPane.getViewport().getViewRect();
            Point location = comp.getLocation();
            if (visibleR.contains(location)){

            } else {

            }

I hope this helps.

We can make an offer to build an extension for you in case you are
interested.

Thanks and regards,

Janak



>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Paolo Scaffardi
>Sent: Friday, August 18, 2006 8:31 PM
>To: [email protected]
>Subject: [ULC-developer] ULCScrollPane: how can we know if a component
>is visible?
>
>
>Hi there!
>I am facing a little problem... i have a big panel inside a
>ULCScrollPane, containing other components. I need to know when these
>components become visible (partially or not) and hidden (i have to do
>some initialization and dispose stuff on them).
>
>Could you help me?
>
>Best regards,
>Paolo Scaffardi
>GFP Lab s.r.l.
>http://www.gfplab.com
>fax 178 2258454
>_______________________________________________
>ULC-developer mailing list
>[email protected]
>http://lists.canoo.com/mailman/listinfo/ulc-developer

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to