Try this:
function matrix:bgcolor_cb(l, c)
-- play here
local green =0
local blue =0
local red =200
if c == 0 then
return iup.IGNORE -- title row, not used
end
if l == 0 then -- title column
return iup.IGNORE
end
return red, green, blue, iup.DEFAULT
end
Best,
Scuri
On Mon, Jun 20, 2016 at 1:05 AM, John Huttley <[email protected]>
wrote:
> Hi Antonio,
>
> (Version 3.18 Win 64-Lua 5.3 Tested on Win7 and Win10)
>
> I've been colourising my Matrixes. I have found a discrepancy in the
> Documentation
>
> ===============
>
> *BGCOLOR_CB* - Action generated to retrieve the background color of a
> cell when it needs to be redrawn.
>
> int function(Ihandle **ih*, int *lin*, int *col*, int **red*, int **green*,
> int **blue*); [in C]*ih*:bgcolor_cb(*lin, col*: number) -> (*red, green,
> blue, ret*: number) [in Lua]
>
> *ih*: identifier of the element that activated the event.
> *lin*, *col*: Coordinates of the cell.
> *red*, *green*, *blue*: the cell background color.
> ==============
>
> It seem clear to me-- from this-- that the function return should be
> return red, green blue
>
> However the correct return for green and blue is
> return green, blue
>
> I can't seem to get red to work at all.
> It shows red as black, which looks same as returning 0,0,0
>
> I have attached my test program in lua.
>
> Regards,
>
> John
>
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> reports. http://sdm.link/zohomanageengine
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users