Discussion:
[Chicken-users] Right-click default menu under Chicken-Scheme
Ritika Agrawal
2018-11-02 18:25:15 UTC
Permalink
Hello,

My team was working on enabling iup:matrix for one of our tools. We noticed
with the Chicken scheme code, we see a default menu on right-click menu.
This default menu is not observed with equivalent Lua code. Can you please
let us know what we can do to suppress this menu-item.

***********Scheme Code**************
(use iup)

(show (dialog (vbox (matrix
numcol: 10
numlin: 20
extended?: #f
click-cb: (lambda (obj . param)
(print "obj: " obj " param: " param))
;; action: (lambda (obj)
;; (print "obj: " obj))
))))

(main-loop)
***********Lua Code**************
require( "iuplua" )
require( "iupluacontrols" )

mat = iup.matrix {numcol=5, numlin=3,numcol_visible=5, numlin_visible=3,
widthdef=34}
mat.resizematrix = "YES"
mat:setcell(0,0,"Inflation")
mat:setcell(1,0,"Medicine")
mat:setcell(2,0,"Food")
mat:setcell(3,0,"Energy")
mat:setcell(0,1,"January 2000")
mat:setcell(0,2,"February 2000")
mat:setcell(1,1,"5.6")
mat:setcell(2,1,"2.2")
mat:setcell(3,1,"7.2")
mat:setcell(1,2,"4.6")
mat:setcell(2,2,"1.3")
mat:setcell(3,2,"1.4")
dlg = iup.dialog{iup.vbox{mat; margin="10x10"}}

dlg:showxy(iup.CENTER, iup.CENTER)

function mat:click_cb(l, c, s)
print(li, c, s)
end

if (iup.MainLoopLevel()==0) then
iup.MainLoop()
end
--
Thanks,

Ritika Agrawal
Design Automation Engineer
Intel Corporation
*We can't help everyone but everyone can help someone. *
Thomas Chust
2018-11-03 11:03:02 UTC
Permalink
On Fri, 2 Nov 2018 11:25:15 -0700 Ritika Agrawal
Post by Ritika Agrawal
[...]
My team was working on enabling iup:matrix for one of our tools. We noticed
with the Chicken scheme code, we see a default menu on right-click menu.
This default menu is not observed with equivalent Lua code. Can you please
let us know what we can do to suppress this menu-item.
[...]
Hello,

probably this additional feature is added by the iupmatrixex library.
To disable use of that library, pass #f for the second optional
argument of the matrix constructor, as documented here:

https://chust.org/repos/scheme-iup/doc/trunk/api/controls.wiki#matrix

Ciao,
Thomas
--
Wenn *das* die Lösung sein soll, dann will ich mein Problem zurÌck!
Loading...