realbasic-plugins
[Top] [All Lists]

Re: Background coloring of a control

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Background coloring of a control
From: Einhugur Software <bjorn at einhugur dot com>
Date: Sun, 23 Jan 2005 03:29:13 +0000
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <BE187A21 dot BCD5%vanhoek at mac dot com>

On 23.1.2005, at 02:46, Alfred Van Hoek wrote:

I am having problems getting a background color to show. I am most likely overlooking something, and searched at many places. Can someone help out
here?:

For example:

    RGBColor rgb;
    WindowRef wref = REALGetWindowHandle(data->windowContainer);
    GetPortBackColor(GetWindowPort(wref), &rgb);

rgb will be {0xFFFF, 0xFFFF, 0xFFFF}

    colr.red = 125;
    colr.blue = 23;
    colr.green = 50;
    RGBBackColor(&colr);

Not sure what you are attempting to accomplish here but the above should be:

    colr.red = 125*255;
    colr.blue = 23*255;
    colr.green = 50*255;
    RGBBackColor(&colr);


--
______________________________________________________________________
Björn Eiríksson                            bjorn at einhugur dot com
Einhugur Software
http://www.einhugur.com/
______________________________________________________________________
Einhugur Software has sold its products in 43 countries world wide.
______________________________________________________________________
For support:                               support at einhugur dot com
To post on the maillist:                   einhugur at yahoogroups dot com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>