Hi,
I'm trying to horizontally align some controls that are in separate
hboxes. I think IupNormalizer should be able to do what I want, but I
can't quite figure out how to use it. The example from the
documentation just has a single call; it doesn't show how it fits in
with building the whole control heirarchy. Here's what I have that
isn't working:
require'iuplua'
local label1 = iup.label{title = 'param 1'};
local label2 = iup.label{title = 'param 2 with long name'};
local norm = iup.normalizer{label1, label2}
norm.NORMALIZE = "HORIZONTAL"
iup.SetAttribute(norm, "NORMALIZE", "HORIZONTAL")
local dialog = iup.dialog
{
title="a dialog", size="QUARTERxQUARTER",
iup.vbox
{
CGAP = "5x5",
CMARGIN = "5x5",
iup.hbox
{
label1; --iup.label {title = "param 1"};
iup.text{};
};
iup.hbox
{
label2; --iup.label {title = "param 2 with long name"};
iup.text{};
};
};
}
norm = iup.normalizer{label1, label2}
norm.NORMALIZE = "HORIZONTAL"
iup.SetAttribute(norm, "NORMALIZE", "HORIZONTAL")
dialog:show()
iup.MainLoop()
dialog:destroy()
iup.Close()
As you can see, I tried applying the normalizer by calling the
constructor, by setting the NORMALIZE attribute, both before and after
building the dialog, but it doesn't appear to have any effect. What I
want is for label1 and label2 to have the same width so that the text
fields line up.
Any suggestions welcome.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users