Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GUIDE pushbutton: How to remove outline?

292 views
Skip to first unread message

Joel

unread,
Jun 17, 2011, 1:39:04 PM6/17/11
to
I am making a GUI using GUIDE. I want to know how to make a pushbuttton object, NOT have an outline. I think the proper term for this might be the "shadow".

PropertyInspector does not list anyting like 'edgecolor', 'LineStyle', 'Shadow' etc that one would think controlled this feature. I can see that some of the other GUIDE elements DO have a shadow property, but not the pushbutton.


An alternate solution that could work for me is to make a button that is entirely clear / invisible. I looked at the background color property and "none" was not a choice.

Any ideas?

matt dash

unread,
Jun 17, 2011, 3:43:04 PM6/17/11
to
"Joel" wrote in message <itg3fo$sgf$1...@newscl01ah.mathworks.com>...

I'm a little curious of what the point of making an invisible button would be... but regardless, it happens that Yair Altman just wrote an article about this very issue:
http://undocumentedmatlab.com/blog/borderless-button-used-for-plot-properties/

Joel

unread,
Jun 17, 2011, 4:37:05 PM6/17/11
to
I did see that article. And that is what I want to do, but I don't want to make a java button. I want to do it with a uicontrol button.

The reason is that I want to record where users click on the screen and response differently based on where they click; without having a visible target.

matt dash

unread,
Jun 17, 2011, 6:01:04 PM6/17/11
to
"Joel" wrote in message <itgdth$1qq$1...@newscl01ah.mathworks.com>...

> I did see that article. And that is what I want to do, but I don't want to make a java button. I want to do it with a uicontrol button.
>
> The reason is that I want to record where users click on the screen and response differently based on where they click; without having a visible target.

uicontrol buttons are java buttons... it's just a different command that makes them. But it sounds like what you really want might be just a figure buttondownfcn, then use get(gcf,'currentpoint').

ImageAnalyst

unread,
Jun 17, 2011, 8:13:43 PM6/17/11
to
On Jun 17, 4:37 pm, "Joel" <espos...@usna.edu> wrote:
> I did see that article.    And that is what I want to do, but I don't want to make a java button.   I want to do it with a uicontrol button.
>
> The reason is that I want to record where users click on the screen and response differently based on where they click; without having a visible target.

--------------------------------------
Why not use an axes control and use ginput to find where they clicked?

Yair Altman

unread,
Jun 19, 2011, 7:53:04 AM6/19/11
to
"matt dash" wrote in message <itgir0$eo8$1...@newscl01ah.mathworks.com>...


Customization of uicontrol buttons, including the issue of changing or removing the border, was discussed here: http://UndocumentedMatlab.com/blog/button-customization/

Yair Altman
http;//UndocumentedMatlab.com

ImageAnalyst

unread,
Jun 19, 2011, 9:14:40 AM6/19/11
to
So you think the best way to determine where the users click on the
screen is to have a gigantic button the size of the entire screen and
somehow determine where they clicked on the button??? Why is this
better than having an axes and using something like ginput to
determine where they clicked like I suggested? I mean, axes are meant
for that, and buttons aren't - that's not the main function of a
button.

Yair Altman

unread,
Jun 19, 2011, 9:46:04 AM6/19/11
to
ImageAnalyst <imagea...@mailinator.com> wrote in message <98a5970d-af1e-45fe...@v10g2000yqn.googlegroups.com>...


ImageAnalyst - you're rushing into an open door. Of course I agree with you that there are better ways to determine where a user clicked. I'm surprised you'd think otherwise, knowing me as you do...

In my answer above, I merely answered the specific question of how to remove a uicontrol's borders. Then again, I guess I could have clarified my answer a bit more, to emphasize this point.

Yair Altman
http;//UndocumentedMatlab.com

0 new messages