フィルターのクリア

making a circular push button

12 ビュー (過去 30 日間)
mohammad asasi
mohammad asasi 2012 年 7 月 24 日
Hi every body...
I have a problem with guide...
How can I make a circular push button in gui???
is this problem is related to "position" property????
help me please with this problem...
[Merging information from duplicate question]
really I dont have problem in setting image for push buttons but suppose we want
to set a circular image for a push button...
when you do that the edges of the image becomes black and this is not beutiful for gui
please help me know how to set an image for push buttons with figure background
color and overcome this problem...

採用された回答

Walter Roberson
Walter Roberson 2012 年 7 月 24 日
There is no (documented) method of setting a non-square image for a push-button, and there is no (documented) method of setting transparency for the image.
You would need to fetch the uicontrol background color and set the part of the image outside the circle to be that color and then set the CData property to that adjusted image. Which will not make it a circular push button, just a rectangular push button that appears circular.
  1 件のコメント
mohammad asasi
mohammad asasi 2012 年 7 月 28 日
thanks walter

サインインしてコメントする。

その他の回答 (1 件)

Jan
Jan 2012 年 7 月 24 日
The appearence of the UICONTROLs is controlled by the opreating system. As Walter has said already, you cannot alter it inside Matlab. If you want to use undocumented features, and you should think twice before you do this, look here for a borderless button: Undocumented: Borderless button. You will find other methods there also.
Of course you could use an image instead and its ButtonDownFcn instead of the Callback. Then the ButtonDownFcn is responsible for changng the apperance of the toggled button. This works well, but think twice also: A user-interface is based on the intuitive look-and-feel and fancy buttons usually repell the users and reduce the usability. Remember the dramaticall increase of the frustration level, when MS Office invents the magic read flower on the left top corner - until today nobody knows what this could be useful for.
  1 件のコメント
mohammad asasi
mohammad asasi 2012 年 7 月 28 日
thanks jan

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by