Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] a batch of rich buttons with an image

HI,

I want to implement a batch of buttons which contain an image.Though
the Button widget can support image now,if we want to add an ofen-used
image,there is still of a lot of trivial and repeated work to
do,i.e.creating the Image object with correct image path,creating the
button with an image parameter.

If some necessary and often-used images like ok,cancel,help,retry
images and so on,can be added to the SWT package, and we use a bit to
create a button with its corresponding image,then how amazing! For
instance,we can use the following code to create a "colorful" and
"useful" button:

Button okBtn = new Button(shell,SWT.PUSH|STYLE.OK);// use one more bit

You can see these buttons at this link:
http://wiki.eclipse.org/images/9/98/Buttons.jpg
Maybe you can visit the page :
http://wiki.eclipse.org/Basic_SWT_widgets_enhancement
if you are interested in this idea.

Regards,
higer


Back to the top