Hello
I have an ULCScrollPane with viewPort and rowHeader.
Each of them contains some TextFields.
On the TextFiels I set scrollToVisible() when gettingFocus.
Now when I scroll with the scrollbar, the rowHeader and viewPort are both
scrolling.
--> OK
When I tab through the Fields in the viw Port, the row Header and viewPort
are both scrolling, to make the focus-field visible
--> OK.
When I tab through the Fields in the rowHeader, only the rowHeader scrolls
to make the focus-field visible, but the viewPort does not scroll.
--> not OK, because rowHeader and viewPort are not synchronous
The same Problem is with columnHeaders on the ULCScrollPane.
Please see the example below.
Thanks for any help.
Regards
Stefan
/**
* TestApplication for ScrollPane with RowHeader
*/
public class ScrollPaneApplication extends AbstractApplication {
public void start() {
ULCFrame frame = new ULCFrame("ScrollPane mit RowHeader");
frame.setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE);
ULCScrollPane scrollPane = new ULCScrollPane();
scrollPane.setRowHeaderView(createFieldsPane("Row Header"));
scrollPane.setViewPortView(createFieldsPane("View Port"));
frame.setSize(new Dimension(400, 300));
frame.add(scrollPane);
frame.setVisible(true);
}
private ULCComponent createFieldsPane(String titel) {
ULCBoxPane pane = new ULCBoxPane(true);
for (int i = 1; i <= 20; i++) {
pane.add(createText(String.valueOf(i)));
}
pane.setBorder(BorderFactory.createTitledBorder(titel));
return pane;
}
private ULCTextField createText(String inhalt) {
final ULCTextField text = new ULCTextField(inhalt, 10);
text.addFocusListener(new IFocusListener() {
public void focusGained(FocusEvent event) {
text.scrollToVisible();
}
public void focusLost(FocusEvent event) {
}
});
return text;
}
public static void main(String[] args) {
DevelopmentRunner.setApplicationClass(ScrollPaneApplication.class);
DevelopmentRunner.main(args);
}
}
--
mailto:[EMAIL PROTECTED] / http://www.dvbern.ch
Nussbaumstrasse 21, Postfach 106, CH-3000 Bern 22
Telefon: ++41 +31 378 24 24 / Telefax: ++41 +31 378 24 74
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer