|
"Bethany " <bmoore33.omit@gmail.com> wrote in message <grfkgr$t3v$1@fred.mathworks.com>...
> I need to create a flashing circle in a GUI, and want to know what my options are. This need for some sort of simple graphic to occur within a GUI keeps arising as I program stimulus experiments for a research lab.
>
> So far, I have only been able to create pushbuttons and use the Cdata property with .bmp images I create. This works well (I have my flashing circle all ready to go), but with one problem: I cannot get rid of the rectangular outline of the pushbutton, so the image always appears in a box and not on a simple background, which can be distracting to subjects.
>
> Does anyone know how to make this outline invisible (without making the button invisible, of course)? What about other options for displaying graphics within a GUI?
>
> thanks in advance,
> Bethany
Bethany-
You have asked a relatively broad question, but I will do my best to help you out on this one.
Is there any particular reason why you are placing the imagedata on a pushbutton? It seems as though you are trying to display the bitmap image (I'm assuming the circle image) and somehow have the user be able to click on it? A better solution would probably be to use an axes and display the imagedata on the axis using imshow/imagesc/image etc. To do this:
1) Load image data using imread for your bitmap
2) Create axes
3) Create image with axes as parent (imagesc(imdata,'parent',axesHandle))
4) You can use "axis image" to get your scaling on the axes correct
5) If you want, you can use "set(axesHandle,'visible','off')" so that you don't see the axes (this would get rid of any borders around the circle image)
6) Set a button down callback for the image ( set(imageHandle,'ButtonDownFcn',@mouseClickCallback))
7) Then create the function mouseClickCallback and have it do whatever you need the pushbutton you used to do.
As far as flashing, I am not sure exactly what you want, i would recommend changing the "visible" property of the image to on/off for blinking on/off.
I hope that this helps somewhat. If you can clarify a little bit maybe we will be able to help you out a little more.
-Jonathan
|