• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rounded corner

 
Nilesh Pat
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

can any one please help me for rounder corners. i stuck on this from many days..

i want to apply round corners to textbox, window panel.
for button i have used image. but it's a single image which didn't grow. so my button stays with same width.
same happens with textbox.

for window panel from using CSS is it possible to make corners rounded??

please help....................
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can choose to simply wrap your widget in a DecoratedPanel.
Else you can check out the css which GWT provides to see how it is done
 
salvin francis
Bartender
Pie
Posts: 1222
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As maneesh said, you can use a decorated panel for it.
Now for the implementation,

you can either use a gif rounded corner (wont be smooth)
or a png rounded corder (smooth)

I prefer to use the GWT's ImageBundle class to do so, it combines all corners into a single image so that its loaded only once by the browser.
the menu in Inf Explorer in my site was done in the same manner.
 
Nilesh Pat
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your replay. maneesh and salvin.
DecoratorPanel is good.
but as salvin said how can i use GWT's ImageBundle class to combines all corners into a single image? and how to apply that image on your widget? can anyone give hint or sample code?
i am new to GWT.
i want to apply round corners to buttons, textboxes, popup panels etc.
 
salvin francis
Bartender
Pie
Posts: 1222
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple. the 4 corners are in your image bundle so you can convert them into an image widget ...
The DecoratorPanel allows you to set the widgets for the corners so you can use those images @ corners...
next you have to figure out what is to be done for the sides...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic