Discuss GUI programming with the RapaGUI plugin here
-
gerograph
- Posts: 56
- Joined: Thu Mar 04, 2010 9:38 pm
Post
by gerograph »
I have got this:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="ToDo">
<vgroup>
<listview id="lstv_debug" >
<column ></column>
</listview>
<listview id="lstv_main">
<column title="Status" checkbox="true"></column>
<column title="Eintrag" editable="true" Width="100"></column>
<column title="Datum" editable="true"></column>
</listview>
<textentry id="txt_input"> </textentry>
<hgroup>
<button id="btn_new">Hinz.</button>
<button id="btn_del">Entf.</button>
</hgroup>
</vgroup>
</window>
</application>
Which options do I have to limit the first lister to a quarter of my windows size? A code snippet would be wellcome, Thx
-
plouf
- Posts: 666
- Joined: Sun Feb 04, 2018 11:51 pm
- Location: Athens,Greece
Post
by plouf »
you can set its size in pixels in height attribute in xml, if you know window size can set it
Code: Select all
xml$ = [[
<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="ToDo">
<vgroup>
<listview id="lstv_debug" height="50" FixHeight="true" >
<column ></column>
</listview>
<listview id="lstv_main">
<column title="Status" checkbox="true"></column>
<column title="Eintrag" editable="true" Width="100"></column>
<column title="Datum" editable="true"></column>
</listview>
<textentry id="txt_input"> </textentry>
<hgroup>
<button id="btn_new">Hinz.</button>
<button id="btn_del">Entf.</button>
</hgroup>
</vgroup>
</window>
</application>
]]
@REQUIRE "RapaGUI"
moai.CreateApp(xml$)
Function p_EventFunc(msg)
DebugPrint(msg)
EndFunction
InstallEventHandler({RapaGUI = p_EventFunc})
Repeat
WaitEvent
Forever
Christos