Need help for creating custim cell [message #568019] |
Sun, 05 November 2006 12:31 |
Kaniska Mandal Messages: 34 Registered: July 2009 |
Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_00CC_01C70104.5E2330D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I want to display a check box, read only text and a button in a single =
cell of CTableTreeItem.
I created a custom cell having the following createTitleContents() ...
protected void createTitleContents(Composite contents, int style) {
contents.setLayout(new FillLayout());
checkBox =3D new Composite(contents, SWT.WRAP);
checkBox.setBackgroundImage(checkBoxImage);
text =3D new Text(contents, SWT.BORDER | SWT.WRAP);
browseDomain =3D new Composite(contents, SWT.WRAP);
browseDomain.setBackgroundImage(browseDomainImage);
}
But nothing is displayed and the UI is scrwed up!
How should I create my custom cell ?
I also need to display a dialog box as the user clicks the button. Is =
it possible to handle button selection within this cell ?
TIA
Kaniska
------=_NextPart_000_00CC_01C70104.5E2330D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I want to display a check box, read =
only text and a=20
button in a single cell of CTableTreeItem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I created a custom cell having the =
following=20
createTitleContents() ...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>protected void=20
createTitleContents(Composite contents, int style) {</FONT></DIV>
<P align=3Dleft><FONT face=3DArial color=3D#0000ff =
size=3D2>contents.setLayout(new=20
FillLayout());</FONT></P>
<P align=3Dleft><FONT face=3DArial color=3D#0000ff size=3D2>checkBox =3D =
new=20
Composite(contents, SWT.WRAP);</FONT></P>
<P align=3Dleft><FONT face=3DArial color=3D#0000ff=20
size=3D2>checkBox.setBackgroundImage(checkBoxImage);</FONT ></P>
<P align=3Dleft><FONT face=3DArial color=3D#0000ff size=3D2>text =3D new =
Text(contents,=20
SWT.BORDER | SWT.WRAP);</FONT></P>
<P align=3Dleft><FONT face=3DArial color=3D#0000ff size=3D2>browseDomain =
=3D new=20
Composite(contents, SWT.WRAP);</FONT></P>
<P align=3Dleft><FONT face=3DArial color=3D#0000ff=20
size=3D2>browseDomain.setBackgroundImage(browseDomainImage); </FONT></P>
<P><FONT face=3DArial color=3D#0000ff size=3D2>}</FONT></P>
<P><FONT face=3DArial size=3D2>But nothing is displayed and the UI is =
scrwed=20
up!</FONT></P>
<P><FONT face=3DArial size=3D2>How should I create my custom cell =
?</FONT></P>
<P><FONT face=3DArial size=3D2>I also need to display a dialog box =
as the user=20
clicks the button. Is it possible to handle button selection =
within this=20
cell ?</FONT></P>
<P><FONT face=3DArial size=3D2>TIA</FONT></P>
<P><FONT face=3DArial size=3D2>Kaniska</FONT></P></BODY></HTML>
------=_NextPart_000_00CC_01C70104.5E2330D0--
|
|
|
Powered by
FUDForum. Page generated in 0.03296 seconds