Hi,
Don't worry about the IupMultiline being deprecated. It will never be
removed from IUP. There are some many applications using it that I can not
remove it. In fact should remove that "deprecated".
And there is no such thing as MULTILINE=HORIZONTAL, it is YES or NO. What
you want is SCROLLBAR=HORIZONTAl. And that will work fine.
Just replace iup.text by iup.multiline in your example, and remove
multiline=yes from it also, that it will work.
Best,
Scuri
From: Benoit Germain [mailto:bnt.germ...@gmail.com]
Sent: quarta-feira, 19 de outubro de 2011 6:32
To: IUP discussion list.
Subject: Re: [Iup-users] IupText MULTILINE and SCROLLBAR attributes (IUP
3.5, Windows 7)
The problem is that IupMultiLine is deprecated as of version 3.0, so in
theory it can disappear anytime (maybe in the 3.6 release even :-)). Also,
it happens that I want to set MULTILINE to "HORIZONTAL" because I don't want
the vertical scrollbar, so IupMultiLine doesn't do what I need anyway.
OTOH, I guess it should be relatively easy to fix the issue by changing the
iteration over the attributes table when constructing an IupText to ensure
that SCROLLBAR is always processed when it should (either before or after
MULTILINE), as in this very bad pseudo code:
iterate over properties
if current property is SCROLLBAR, store the value and skip to next
property
process current property here and now
done
if we saw SCROLLBAR in the loop above, process the stored value now.
else if we saw MULTILINE in the loop above, apply SCROLLBAR = "YES"
or, if SCROLLBAR must be detected and applied before MULTILINE:
iterate over properties
if current property is SCROLLBAR process it here and now, and interrupt
the loop
if current property is MULTILINE, remember it
skip and ignore all other properties
done
iterate over properties
if current property is SCROLLBAR, skip it
if current property is MULTILINE and SCROLLBAR was not encounterered in
the first loop, set SCROLLBAR to "YES".
process current property here and now
done
Yes, that's two loops, but it does the job. And it isn't really a
performance problem, since there aren't that many properties anyway, and I
don't plan to spawn thousands of IupText controls per second :-).
Regards,
Benoit.
2011/10/18 Antonio Scuri <sc...@tecgraf.puc-rio.br>
There is something missing in the documentation. When the multiline
attribute is set, the scrollbar attribute is reset to YES. Since we cannot
guarantee the order the attributes will be set using the Lua constructor, it
seems that the scrollbar attribute is being replaced.
So, you can set the scrollbar attribute after that constructors using
dlg[1][1].scrollbar = "No", or you can use the iup.multiline constructor to
create the control and do not set the multiline attribute.
Sorry for the inconvenience.
Best,
Scuri
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users