Lines 31-42
Link Here
|
31 |
* </p><p> |
31 |
* </p><p> |
32 |
* <dl> |
32 |
* <dl> |
33 |
* <dt><b>Styles:</b></dt> |
33 |
* <dt><b>Styles:</b></dt> |
34 |
* <dd>TOP, BOTTOM</dd> |
34 |
* <dd>TOP, BOTTOM, SINGLE, MULTI</dd> |
35 |
* <dt><b>Events:</b></dt> |
35 |
* <dt><b>Events:</b></dt> |
36 |
* <dd>Selection</dd> |
36 |
* <dd>Selection</dd> |
37 |
* </dl> |
37 |
* </dl> |
38 |
* <p> |
38 |
* <p> |
39 |
* Note: Only one of the styles TOP and BOTTOM may be specified. |
39 |
* Note: Only one of the styles TOP and BOTTOM may be specified. |
|
|
40 |
* Only one of the styles SINGLE and MULTI may be specified. |
41 |
* MULTI (multi-line tabs) is not supported on all platforms so it is just considered a hint. |
40 |
* </p><p> |
42 |
* </p><p> |
41 |
* IMPORTANT: This class is <em>not</em> intended to be subclassed. |
43 |
* IMPORTANT: This class is <em>not</em> intended to be subclassed. |
42 |
* </p> |
44 |
* </p> |
Lines 160-165
Link Here
|
160 |
|
162 |
|
161 |
static int checkStyle (int style) { |
163 |
static int checkStyle (int style) { |
162 |
style = checkBits (style, SWT.TOP, SWT.BOTTOM, 0, 0, 0, 0); |
164 |
style = checkBits (style, SWT.TOP, SWT.BOTTOM, 0, 0, 0, 0); |
|
|
165 |
style = checkBits (style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0); |
163 |
/* |
166 |
/* |
164 |
* Even though it is legal to create this widget |
167 |
* Even though it is legal to create this widget |
165 |
* with scroll bars, they serve no useful purpose |
168 |
* with scroll bars, they serve no useful purpose |
Lines 656-661
Link Here
|
656 |
int bits = super.widgetStyle () | OS.WS_CLIPCHILDREN; |
659 |
int bits = super.widgetStyle () | OS.WS_CLIPCHILDREN; |
657 |
if ((style & SWT.NO_FOCUS) != 0) bits |= OS.TCS_FOCUSNEVER; |
660 |
if ((style & SWT.NO_FOCUS) != 0) bits |= OS.TCS_FOCUSNEVER; |
658 |
if ((style & SWT.BOTTOM) != 0) bits |= OS.TCS_BOTTOM; |
661 |
if ((style & SWT.BOTTOM) != 0) bits |= OS.TCS_BOTTOM; |
|
|
662 |
if ((style & SWT.MULTI) != 0) bits |= OS.TCS_MULTILINE; |
659 |
return bits | OS.TCS_TABS | OS.TCS_TOOLTIPS; |
663 |
return bits | OS.TCS_TABS | OS.TCS_TOOLTIPS; |
660 |
} |
664 |
} |
661 |
|
665 |
|
Lines 782-788
Link Here
|
782 |
return result; |
786 |
return result; |
783 |
} |
787 |
} |
784 |
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); |
788 |
int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); |
785 |
if ((bits & OS.TCS_MULTILINE) != 0) { |
789 |
if ((bits & (OS.TCS_MULTILINE | OS.TCS_VERTICAL)) != 0) { |
786 |
OS.InvalidateRect (handle, null, true); |
790 |
OS.InvalidateRect (handle, null, true); |
787 |
return result; |
791 |
return result; |
788 |
} |
792 |
} |