[Prev][Next][Index][Thread]

Re: DUIM background colors




Hi Ron,

> How do you set the background of a <text-field> in DUIM? I want to
> dynamically change the background color to indicate a field's
> status. I haven't found a key/property that seems appropriate.

There is no way to do this in DUIM itself, you will need to use the
Windows APIs. Roughly what this entails is:

 - use the win32-duim module from the DUIM library

 - get hold of the Windows control from the gadget using:

     let handle :: <HWND> = window-handle(text-field);

 - change the color of the control using the appropriate Win32 API
   call (I don't know what this is offhand, I can look it up if you
   don't have access to it).

It would be nice to allow you to do this directly from DUIM, probably
using sheet-background-setter. We'll add it to our list of things to
look at.

I hope this helps,

Andy

----------
Andy Armstrong (andrewa@harlequin.com),
Harlequin Inc.