On Wed, Dec 7, 2011 at 6:04 AM, Oliver Sims <
[email protected]> wrote:

> **
> I want to display a small image on a dialog (a UserDialog).
> When the user clicks this image, I want it to change to another image (a
> "grayed-out" version of the first image).
> This will be reset to the first image either programatically or when then
> user clicks the grayed out image.
>
> Each image is a separate bitmap file (but I could make it some other type
> such as .ico).
>
> My question is, what's the best (neatest) (least code) way to do this?
>
>

I think the proper way to do it is to use a static image control.  You give
the static control the NOTIFY style and then you will receive notifications
of clicks, so you can use connectStaticEvent().  The static image control
can be either a bitmap or an icon.  You can also use the 2 styles for the
static control.  One will resize the control to the size of the bitmap or
icon, the other will resize the image to the size of the control.

In initDialog, you use the setImage, or setIcon methods to set your image
in the static control.

I have some code, but it is code I used for testing and so would need some
clean up.  But, I think you can get the idea from the hints above and the
doc.  If you still  have problems, then just say so and I'll post some
example code.

--
Mark Miesfeld
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to