简体   繁体   中英

How to create a button on our desire shape like circle, star in flex 3?

I would like to customize the shape of the button to different shapes like circle, star, square or of any shape. How would i achieve so?

I apologize because this doesn't answer your question, but:

In order to make sure the user can reliably click on your button, you probably want it to be a convex shape. A rectangle or circle is fine, and you could paint a star on it. But you wouldn't want the user to try to click your star and miss, just because they were not quite inside one of its arms.

Canvas can be used as button. Take a canvas of required size. Give your required button shape(image) as background image to canvas. Example:

Explanation: {nextYellowButton} is the embedded button. It is an arrow mark shape button. It is a .PNG image. So, it doesn't include the background color. Now your button is of arrow shape. it occupies 50px * 50px area on screen. But it looks exactly like an arrow mark.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM