No. The canvas is side by side with the text. It will be used as a handler for moving the box that is positioned in absolute coordinates on the cbox.
Best, Scuri Em 14/08/2014 21:39, "Milind Gupta" <[email protected]> escreveu: > Hi Antonio, > Thanks for your reply. > " > For instance, a IupCanvas, inside a IupVbox where you add another element. > Processing mouse callbacks on the IupCanvas is possible to move the box > around. > " > > So this means I have a IupCanvas and then also have my iuptext overlapping > it? IupCanvas is used to get the mouse cursor position feedback to possibly > draw/erase a highlighting border around the iuptext box or to change the > position of the iuptextbox if there is a drag action on the mouse detected > by IupCanvas. Would that work? > > Thanks, > Milind > > > > > On Thu, Aug 14, 2014 at 2:28 PM, Antonio Scuri <[email protected]> > wrote: > >> Hi, >> >> 1. use IupText, don't think the highlight would be possible >> 2. in the valuechanged_cb change the VISIBLECOLUMNS and VISIBLELINES >> attributes so they match the text >> 3. use IupImage and IupLabel >> 4. not simple >> >> The canvas can be a IupCbox inside a IupBackground box or inside a >> IupFrame, but there is no support for dragging a control around. But it is >> possible by creating a custom box that has a handler that can be moved >> around and has some highlight feedback. For instance, a IupCanvas, inside a >> IupVbox where you add another element. Processing mouse callbacks on the >> IupCanvas is possible to move the box around. >> >> Best, >> Scuri >> >> >> >> >> >> >> >> >> >> On Tue, Aug 12, 2014 at 5:40 PM, Milind Gupta <[email protected]> >> wrote: >> >>> Hi, >>> I am looking to emulate a form which has boxes whose sizes can >>> vary as the text in them is written. These boxes have to handle text with >>> formatting (rich text). Is it possible and by any chance any example or >>> tutorial of such a program, hopefully in Lua? I would want to place these >>> boxes on a white background so that it gives an impression of writing on a >>> document. >>> The specific functionality would be: >>> >>> 1. These boxes are on a white canvas and want to highlight their >>> boundary with mouse over or they may have a visible border all the time >>> 2. Box grows in size to accommodate text as the text fills up the box >>> (scroll bars should not appear) >>> 3. Would want to place images as well on the same canvas in different >>> areas >>> 4. Would want functionality to be able to drag these boxes around with a >>> mouse on the canvas >>> >>> Any suggestions and help would be really welcome. >>> >>> Thanks, >>> Milind >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Iup-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/iup-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Iup-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/iup-users >> >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Iup-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/iup-users > >
------------------------------------------------------------------------------
_______________________________________________ Iup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/iup-users
