Thread View: pl.comp.lang.java
1 messages
1 total messages
Started by Jopotam
Fri, 22 Jul 2011 07:48
SWT ustawienie focusa w ToolBar
Author: Jopotam
Date: Fri, 22 Jul 2011 07:48
Date: Fri, 22 Jul 2011 07:48
19 lines
1541 bytes
1541 bytes
Mam okienko edycyjne w SWT gdzie na tym samym Composite jest wstawionych
pare przyciskow ToolBar a ponizej szereg pol edycyjnych.
Po nacisnieciu na Enter na jednym z pol chcialem aby focus ustawil sie na
przycisk Save. Uzylem do tego celu KeyListener
ale niestety ciagle otrzymuje komunikat:
java.lang.NullPointerException
Zrobilem nawet oddzielna metode do tego celu ale z takim samym rezultatem
void setFocusSave()
{
toolBarEdit.itemSave.getControl ().setFocus ();
}
Przy probie ustawienia Focus na inne pole edycyjne wszystko dziala
poprawnie.
Powiedzcie mi gdzie lezy moj blad bo juz sie zapetlilem.
--
jopotam
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads