Kris-
I
don't know much in particular about StyledText, but I can tell you a little
about style bits and how to find out more about them.
Style
bits are integer constants that can be "OR"ed together to specify the kind of
widget you want. They are supplied in the constructor because on many
underlying OS platforms, you must pass these values when you first create the
widget.
To
find out what style bits a widget takes in its constructor, check the table in
the Platform Plug-in Developer Guide or the javadoc for a
particular widget.
You
can get to the developer's guide in Eclipse by choosing Help Contents.
Then Choose "Platform Plugin Developer Guide" in the combo box.
Look for the section
Standard Widget Toolkit->Widgets->Custom
widgets.
There
is a table of style bits for the custom widgets, including styled
text.
This
was derived from the javadoc. For any widget, check the javadoc and you
will see a heading called "Styles" which describes the ones that are relevant
for the widget.
The
constants themselves are defined in the SWT class.
Hope
this helps....
susan
How do I create a StyledText object. What
actually goes into the arguements ?
I am using
currentDisplay.getActiveShell() as firstArguement
(where currentDisplay = Display.getCurrent) and I never understood that SWT
style bits arguement. Why is it there ?
Can I use TextViewer and then try getting the
StyledText ? But for that I tried Shell (first arguement the same
currentDisplay.getActiveShell() ) but again the style bits are goofing.
I will be really greatful if somebody can
help on this.
Tons of thanks in advance.
Regards,
Kris
|