Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Need help for creating custim cell
Need help for creating custim cell [message #568019] Sun, 05 November 2006 12:31
Kaniska Mandal is currently offline Kaniska MandalFriend
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>&nbsp;</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>&nbsp;</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&nbsp;also need to display a dialog box =
as the user=20
clicks the button.&nbsp; 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--
Previous Topic:tableTreeViewer.reveal & Decorators
Next Topic:Need help for creating custim cell
Goto Forum:
  


Current Time: Fri Apr 26 23:48:46 GMT 2024

Powered by FUDForum. Page generated in 0.03296 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top