|
Hi Janak, Thank you very much for help. It works well. Levcik Anton From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Janak Mulani Hi Anton, Please see the attachment. Thanks and regards, Janak -----Original Message----- the story is a little complicated: One approach would be as follows: - Install a FocusListener on your ULC text
fields - Call
ULCTextField.scrollToVisible() on a correcponding text field when it
gets the focus Unfortunately
ULCTextField.scrollToVisible() cannot do its job properly because of a Swing-Bug as reported in the problem report UBA-6815 (see our
bug data base). Apart from this, the solution would also
be rather ineffecient because the focus change to a corresponding text field would cause
a server round trip. The alternative solution is to write an
extension: This includes subclassing the class UITextField. To give you an idea
of what you should do, I have attached an example that might
solve parts of your problem: - The method
UITextFieldScrollToVisible.findScrollPaneAndAttachListener() searches for a parent JScrollPane of a
corresponding text field. Whenever the text field gets the
focus, it also checks if it is visible in the scrollpane. If not, it adjusts the viewport in
an appropriate way. - For the server-side of ULC,
the class ULCTextFielScrollToVisible is needed. Note the lines 40 to the calls of
findScrollPaneAndAttachListener() on the client side at the right time. This must be done after the corresponding
text fields have been uploaded. (which means after line
"frame.setVisible(true);" was invoked.) |
Title: many Text Fields on ULCBoxPane surrounded with a ULCScrollPane
- [ULC-developer] How to scroll to undisplayed text field Anton Levcik
- RE: [ULC-developer] How to scroll to undisplayed text fi... Janak Mulani
- RE: [ULC-developer] How to scroll to undisplayed tex... Anton Levcik
- RE: [ULC-developer] How to scroll to undisplayed... Janak Mulani
- RE: [ULC-developer] How to scroll to undispl... Anton Levcik
- RE: [ULC-developer] How to scroll to undisplayed text fi... Anton Levcik
