If you are able to use .pngs with a full alpha channel in your project (IE6 does not support them without a work-around - google 'ie6 png') you can have great success using images. If you only have a few different background colors on your site, than create a rounded corner - fill in the area that is the background with its appropriate color and leave the area that will form the face of the button transparent. Then, you can use those four rounded corners (in various colors) to round everything from buttons to containers. Simple set the background color of the button to be the color that you want it to be, and whala! Now you have buttons in any color :)
To create the PrettyButton widget you can use a grid wrapped in a focus panel - just make sure to use setCellSpacing(0) and setCellPadding(0) on the grid. You can use the same method to create a PrettyCornersWidget that will take a widget as an argument, then wrap it in rounded corners. On Jan 2, 4:00 am, dduck <[email protected]> wrote: > Hi, > > I would like to make a button that looks like this: > > (|| text ||) > > ...where ( is a rounded left-end of the button, ) is a rounded right- > end of the button, || is a background and "text" can be specified e.g. > at creation. Thus, all buttons of this type would share the same > style, but not the same text on the face of it. Examples: > > (|| OK ||) > (|| My very long button text ||) > > How would I go about this, without having to generate each individual > button as an image in my drawing program? > > Anders --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
