Re: [Iup-users] Text formatting issue with version 3.9, Windows 7 64 bits
Brought to you by:
scuri
From: Antonio S. <ant...@gm...> - 2013-12-04 16:38:44
|
Hi, Got your message. We will check what's going on in a couple of days. Best, Scuri From: Benoit Germain [mailto:bnt...@gm...] Sent: quarta-feira, 4 de dezembro de 2013 14:26 To: IUP discussion list Subject: [Iup-users] Text formatting issue with version 3.9, Windows 7 64 bits Hello, The documentation says: "SELECTION/SELECTIONPOS: same as the IupText SELECTION/SELECTIONPOS <http://www.tecgraf.puc-rio.br/iup/en/elem/iuptext.html#SELECTION> attributes. If not defined the IupText attribute will be used. If the IupText attribute is also not defined then the current position will receive the format, so new text inserted or typed will be formatted with the tag (this is not working in GTK)." I understand that in a case where I send "ADDFORMATTAG" commands to an IupText control, where the selection is empty, the formatting will apply to subsequent text that will be appended to the text (provided the text is inserted at the point where the formatting is active) I have an application which relies on this behaviour that was using IUP 3.6, and where text formatting broke with the update to version 3.9. I want to append text with a color highlight to a control. To do do so I clear any selection, add the format tag, then append the text. It looks like only the first line of text can receive the highlight if I start with an empty text. If I append a line of text to a control that already contains some text, then the new line isn't highlighted. Please check the attached Lua sample that demonstrates the issue. As a side note, the "APPEND" command works when run with a lua52.exe console application, but fails when using a wlua52.exe windows application. (I suppose the only the difference is that the native controls are not the same because of this manifest thingy causing the old version of the native controls library to be loaded). Regards, -- Benoit. |