Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Arrow Button with Text
Arrow Button with Text [message #442635] Thu, 09 September 2004 14:49 Go to next message
Robin Raddatz is currently offline Robin RaddatzFriend
Messages: 10
Registered: July 2009
Junior Member
Hi there,
I'm new to SWT. I am trying to create an arrow button that also
contains text. I've tried creating a custom widget and it either creates
2 buttons next to each other, a button and a label or a button and text.
This is probably an easy thing to do, but I'm new to this and am having
trouble.

Thanks,
Robin
Re: Arrow Button with Text [message #442652 is a reply to message #442635] Thu, 09 September 2004 21:11 Go to previous message
Jainthra Fernandes is currently offline Jainthra FernandesFriend
Messages: 13
Registered: July 2009
Junior Member
SWT does not support both text and arrow.
Check out the code of setText() on Button
public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.ARROW) != 0) return;
int newBits = OS.GetWindowLong (handle, OS.GWL_STYLE);
int oldBits = newBits;
newBits &= ~(OS.BS_BITMAP | OS.BS_ICON);
if (newBits != oldBits) {
OS.SetWindowLong (handle, OS.GWL_STYLE, newBits);
}
TCHAR buffer = new TCHAR (getCodePage (), string, true);
OS.SetWindowText (handle, buffer);
}
Previous Topic:Ant jspC in Eclipse
Next Topic:jigloo beginner question
Goto Forum:
  


Current Time: Wed Apr 24 15:50:45 GMT 2024

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

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

Back to the top