[Iup-users] Inserting text into matrix cell during editing...
Re:auto completion in Iup.matrix
Andrew Wilson
agrwagrw at gmail.com
Fri Mar 9 00:52:01 BRT 2007
Antonio,
I'm sure I'm missing something simple, but here is a short iuplua
script which attempts to append the string "more" to all input, but
unfortunately doesn't work. But the caret does get positioned, also
the callback action_cb doesn't work but action does?
Any ideas as to what I'm doing wong?
-- test append to cell
local matrix = iup.matrix{ numlin=3, numcol=4, scrollbar="YES",
RESIZEMATRIX="YES", }
function matrix:action(c,line,col,active,after)
print("action",c,line,col,active,after)
local current=line..":"..col
-- append string "more" into current cell
iup.SetAttribute(matrix,current,after.."more")
-- alway put carat at beginning
iup.SetAttribute(matrix,"CARET","1")
-- force redraw
iup.SetAttribute(matrix,"REDRAW","ALL")
return c,iup.DEFAULT
end
dlg = iup.dialog{matrix,title="test" }
dlg:showxy(iup.CENTER, iup.CENTER)
Thanks
Andrew
On 3/8/07, Antonio Scuri <scuri at tecgraf.puc-rio.br> wrote:
>
> Hi,
>
> Inside the ACTION_CB callback, set VALUE and CARET attributes.
>
> Best,
> Scuri
>
> > -----Original Message-----
> > From: iup-users-bounces at lists.luaforge.net
> > [mailto:iup-users-bounces at lists.luaforge.net] On Behalf Of
> > Andrew Wilson
> > Sent: quinta-feira, 8 de março de 2007 09:49
> > To: iup-users at lists.luaforge.net
> > Subject: [Iup-users] Inserting text into matrix cell during
> > editing... Re:auto completion in Iup.matrix
> >
> > Maybe a clearer statement of the problem would be "How can you append
> > text into a Iup.Matrix cell while editing the cell?"
> >
> > AGRW
> >
> > On 3/7/07, Andrew Wilson <agrwagrw at gmail.com> wrote:
> > > Hi Iup list,
> > >
> > > I'm attempting to make a little app that uses iup.matrix
> > and does auto
> > > completion in the cells, but there doesn't seem to be a way
> > to do this
> > > (I've tried variation of call backs action,value, redraw etc), so
> > > question is can iup.matrix implement auto completion of
> > text in cells?
> > >
> > > I'd really like to be able to do auto completion because it make
> > > repetitive input easy.
> > >
> > > Cheers
> > > Andrew
> > >
> >
> > _______________________________________________
> > iup-users mailing list
> > iup-users at lists.luaforge.net
> > http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
> >
>
>
More information about the iup-users
mailing list