67 views
in Embedded Wizard Studio by
Hi,

I want to design a rectangular shaped button with top two side as curved shaped .i am unable to search widgets

1 Answer

0 votes
by

Hello,

the usual approach for this case is to provide bitmaps with the desired curved images. You can design the bitmaps by any graphic editor (PhotoShop, Affinity Designer, GIMP, etc.). Embedded Wizard supports 9-slice scaling, so in particular cases the button can even be free scalable. So far the theory.

If you are using the default Push Button widget, you can configure it to use the bitmaps. See Specify bitmaps and colors for the Push Button.

Alternative approach would be to draw the button by vector graphic views. This is is however not applicable for the ready to use widgets. Therefore you would need to create your own button component. Since vector graphic operations are not as fast as bitmap operations this approach is also less efficient.

Does it help you?

Best regards

Paul Banach

by

hi Paul ,

 

It help me , i made the button with with 9 slice frame but want to understand how can i changed the color of the border line .

I tried with the properties color but i does not changed . So any point which i am missing?https://ask.embedded-wizard.de/?qa=blob&qa_blobid=12768767051701510120

by

Hello,

in such case you could prepare several bitmaps, each with different colors. Then you create several button config objects and initialize each object with the respective bitmap. Finally, to display a button with the particular color you select the suitable config object in the button. For example, you create one config object for the red button, one for a green button, one for blue button, etc. In the button you select the right config object.

Alternative approach is to use ALPHA8 bitmaps for the buttons. Then you can determine the color by the TintXXX properties. ALPHA8 bitmaps contain opacity information only. They don't have color information. Disadvantage of this approach is that the ALPHA8 bitmap can be tinted by one color at the same time. Its usage depends thus on your expected design. If you want the buttons to display different colors at the same time, the approach will not work. In turn, if you like this approach, please check the attribute Format of the bitmap resources used for the button. It should be Alpha8.

Does it help you further?

Best regards

Paul Banach

by

HI Paul ,

 

I tried this experiment please refer the attached image I tried two method 

1. Image view 

2. Bitmap frame 

Probably i have to use Bitmap frame  but if you refer the image you will in second image two more  black lines are created .I am confused how it is being created and i dont want that

 

waiting for valuable feedback

 https://ask.embedded-wizard.de/?qa=blob&qa_blobid=5303302208987202765

by
Hello,

it seems, the black pixel results from the content of the image file. Please check, whether the inner area of the image is completely yellow. You can also upload the image file for verification purpose. Is the size (width and height) of the image a multiple of 3?

Best regards

Paul
by

https://ask.embedded-wizard.de/?qa=blob&qa_blobid=14698987257190808283

 

I guess it is multiple of 3

original size : 225 X 75 pixel 

new size : 98 X 34 pixel 

by

Please see the small gaps on the left and on the right of the black bar in the lower tile:

When the image is stretched, the middle tile is duplicated. The gaps are duplicated too. You have to correct the image, so the black bar fills this tile completely. For example:

See also: Frame views and 9-slice image scaling.

I hope it helps you further.

Best regards

Paul Banach

 

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...