[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: subclassing

Hi,

I have set size not from CustomLabel class.i'll set size from where i m
making instance to it.like from another class,

CustomLabel c=new CustomLabel(a,b);
c.setBounds(a,b,c,d);

like this..

i have to little more functionality to label. i have only provided a test
sample.i need to subclass becoz i need uneque id for each label.i know
there is a setData(object) method in Widget class.but i like to
subclass.coz i m converting my swing program to SWT.in the previous
program,i subclassed label.so subclassing solution may be best.

wrapping couse a lot of changes in my base program.so plz giv me a good
suggestien

basha 


Veronika Irvine wrote:

> All widgets expect Shell are created as visible by default.

> The problem is probably that you have not set the size of the widget (using
> a layout on the parent or by calling setSize or setBounds on the label).

> I can see no reason from your example why you needed to subclass Label.

> "Ralf Koban" <ralf.koban@xxxxxx> wrote in message
> news:bfog72$l8k$1@xxxxxxxxxxxxxx
> > Hi basha,
> >
> > did you set your label visible?
> > I derived my own CustomLabel and everything works like expected.
> >
> > Ralf
> >
> > basha schrieb:
> >
> > > Hi ralf,
> > >
> >
> > [snip]
> >
> > >
> > >>>Label i needed is not displaying in shell.how to sesolve this
> problom?.i
> > >>>just provided some functionality to the label such as added
> mouselistener
> > >>>and image.plz tell me ur experience and thoughts
> > >>>
> > >>>basha
> > >
> > >
> > >
> >