Hi,

  IupGLSubCanvas does not have an ACTION callback. It is called
"GL_ACTION".

  But you can not simply replace the canvas callback by the subcanvas
callback, they operate in different levels. You must leave the clear in the
general callback, and do only the line drawing in the subcanvas callback.

  Once you place the subcanvas outside a dynamic layout, you will have to
manually resize it. Or you can set expandhorizontal and expandvertical
attributes to do that for you.

  See the attached example.

Best,
Scuri


2017-07-26 14:09 GMT-03:00 Antonio Scuri <[email protected]>:

>   I haven't looked at it yet. I'm on vacation. Be back tomorrow.
>
> Best,
> Scuri
>
> Em 26/07/2017 11:02, "Milind Gupta" <[email protected]> escreveu:
>
>> Hi Antonio,
>>          Any suggestions why defining the action call back is causing an
>> error?
>>
>> Milind
>>
>> On Tue, Jul 25, 2017 at 8:42 AM, Milind Gupta <[email protected]>
>> wrote:
>>
>>> Hi Antonio,
>>>             Please see the attached example. When I run this I get this
>>> error:
>>>
>>> lua: [string "iuplua.lua"]:139: bad argument #3 to 'SetCallback'
>>> (Invalid functi
>>> on when set callback.)
>>> stack traceback:
>>>         [C]: in function 'iuplua.SetCallback'
>>>         [string "iuplua.lua"]:139: in metamethod '__newindex'
>>>         glcanvasbox2.lua:13: in main chunk
>>>         [C]: in ?
>>>
>>>
>>> Please can you help me fix it.
>>>
>>> Thanks,
>>> Milind
>>>
>>>
>>> On Tue, Jul 25, 2017 at 6:56 AM, Antonio Scuri <[email protected]>
>>> wrote:
>>>
>>>>   The IupGLCanvasBox was designed to be a background drawing while the
>>>> controls are drawn on the foreground. So I think that one possible approach
>>>> is to use this glsubcanvas with zorder=top.
>>>>
>>>>   In the error it seems that you are trying to set a non function as a
>>>> callback. You should check that.
>>>>
>>>> Best,
>>>> Scuri
>>>>
>>>> Em 24/07/2017 19:31, "Milind Gupta" <[email protected]> escreveu:
>>>>
>>>> I tried placing a glsubcanvas over the whole canvas box and tried to do
>>>> all the drawing in the action callback of the subcanvas but I get this
>>>> error then:
>>>>
>>>> [string "iuplua.lua"]:139: bad argument #3 to 'SetCallback' (Invalid
>>>> function when set callback.)
>>>> stack traceback:
>>>> [C]: in function 'iuplua.SetCallback'
>>>> [string "iuplua.lua"]:139: in metamethod '__newindex'
>>>>
>>>> In my program it points to the link where the action callback function
>>>> starts.
>>>>
>>>> On Mon, Jul 24, 2017 at 3:16 PM, Milind Gupta <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>        I notice that if I draw anything on the glcanvasbox it is
>>>>> always behind the glcontrols like gllabel, etc. Is there a way for me to
>>>>> draw and be on top of those controls?
>>>>>
>>>>> Thanks,
>>>>> Milind
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Iup-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Iup-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>>
>>>>
>>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Iup-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
>>

Attachment: glcanvasbox2.lua
Description: Binary data

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to