Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] how to get all the text components in a subclass of TitleAreaDialog ?


Hi, Dov.

Get the shell using getShell() and then ask it for its children using getChildren();
You will have to test each child to see if it is an instanceof Text. (I assume you meant Text and not TextField).
If it is, cast it to Text, and send getText();

In future, please ask user questions on the swt newsgroup: news://news.eclipse.org/eclipse.platform.swt

Have fun,
Carolyn



"Dov MORYUSEF" <moryusef@xxxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

01/18/2006 06:25 AM

Please respond to
"Eclipse Platform SWT component developers list."

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] how to get all the text components in a subclass        of TitleAreaDialog ?





Hi to all,

First excuse my bad English ;-)

I'm developing a JFace/SWT application which consists on a main Frame with
menu and dialogs.

This application contains a general MyDialog class which extends
TitleAreaDialog class and all the dialogs herit of MyDialog class. Each
dialogs contains TextFields on which I would like to check, when user clicks
OK,  a specific control. Instead of checking this control in every dialog
classes, I would like to check it only once in okPressed() method of
MyDialog class.

So, I would like to get in MyDialog class all of the TextFields (with text
values) components of the dialog.

Is there a way for doing that ?

Thanks a lot for your answers.

Dov


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top