Hi,
   I have the sample dialog below. When it appears for the 1st time it
looks fine. Now I am having 2 problems with it that I don't understand:

1. The dialog allows itself to be sized smaller than QUARTERxQUARTER which
I declared as the size. From the documentation I understood that that
should not happen unless I set the shrink="YES" attribute.

2. As soon as I resize it the internal elements explode in the X direction
because of the iuplabel, even though I have wordwrap="YES"


Please help me figure out why this dialog behaves this way and what I can
do to fix it.

Thanks,
Milind


require("iuplua")

local busPane = {}
busPane.regDrop = iup.list{"ACBUS","ADBUS";dropdown =
"YES",expand="HORIZONTAL",value=1}
busPane.rwcheck = iup.toggle{title="Write"}
busPane.dir =
iup.text{mask="[/I/O][/I/O][/I/O][/I/O][/I/O][/I/O][/I/O][/I/O]",expand="HORIZONTAL",active="NO"}
busPane.data =
iup.text{mask="[0-9a-fA-F][0-9a-fA-F]",expand="HORIZONTAL",active="NO"}
busPane.ins = iup.label{wordwrap="YES",alignment="ALEFT",expand="YES"}
busPane.vbox = iup.vbox{
iup.hbox{
busPane.rwcheck,
busPane.regDrop,
gap="2",
margin="2x2"
},
busPane.ins,
iup.hbox{
iup.label{title="Direction: "},
busPane.dir,
gap="2",
margin="2x2"
},
iup.hbox{
iup.label{title="Data (Hex 8 bit): 0x"},
busPane.data,
gap="2",
margin="2x2"
},
iup.fill{}
}
 function busPane.rwcheck:action(state)
if state == 1 then
-- Checked
busPane.dir.active = "YES"
busPane.data.active = "YES"
else
-- unchecked
busPane.dir.active = "NO"
busPane.data.active = "NO"
end
end
 local addButton = iup.button{title="Add Before current
Line",expand="HORIZONTAL"}
local appendbutton = iup.button{title="Append",expand="HORIZONTAL"}
local doneButton = iup.button{title = "Done",expand = "HORIZONTAL"}
local actionTabs =
iup.tabs{busPane.vbox;tabtitle0="Registers",tabtitle1="Delay",tabtitle2="ACBUS/ADBUS",expand="YES"}
local dlg =
iup.dialog{iup.vbox{actionTabs,iup.hbox{addButton,appendbutton,doneButton,gap="2",margin="2x2"}},size="QUARTERxQUARTER"}
dlg:show()
busPane.ins.title = "Enter the Direction and data. Direction is a string
with just I or O characters standing for Input and Output respectively"

-- Main IUP events loop
if (iup.MainLoopLevel()==0) then
  iup.MainLoop()
end
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to