Page 1 of 2

Listview visible entries

Posted: Wed Jan 29, 2014 12:45 pm
by GMKai
Hello, I currently have this listviews

Code: Select all

				<vgroup>
					<hgroup title="Menu">
						<rectangle/>
						<button id="btshowclubdetails"    notify="pressed">\33A[13]_ShowClubDetails</button>
						<button id="btclearclubselection" notify="pressed">\33A[19]_ClearSelection</button>
						<button id="btgotomain7"          notify="pressed">\33A[9]_main</button>
						<rectangle/>
					</hgroup>
					<vgroup id="listofleagues" disabled="false" frame="group" frametitle="Leaguelist">
						<rectangle/>
						<listview id="leaguelist" autovisible="true" MultiSelect="None" frame="InputList" notify="active">
							<column title="ID"></column>
							<column title="Name"></column>
							<column title="Nation"></column>
						</listview>
						<rectangle/>
					</vgroup>
					<vgroup id="listofclubs" disabled="false" frame="group" frametitle="Clublist">
						<rectangle/>
						<listview id="clublist" autovisible="true" MultiSelect="None" frame="InputList" notify="active">
							<column title="ID"></column>
							<column title="Name"></column>
							<column title="League"></column>
							<column title="Account"></column>
							<column title="Stadium"></column>
						</listview>
						<rectangle/>
					</vgroup>
				</vgroup>
What can be done to extend the visible entries to more than 3?
Should I set some minimal windowsize somehow?

Re: Listview visible entries

Posted: Fri Jan 31, 2014 12:56 pm
by airsoftsoftwair
Yes, this is usually done by setting an appropriate window height.

Re: Listview visible entries

Posted: Sat Feb 01, 2014 12:05 pm
by GMKai
My window is defined like this:

Code: Select all

<window title="HSM-Game" id="win" muiid="HSMW" height="640" width="480" notify="closerequest" userightborderscroller="false" usebottomborderscroller="false">
but to me it does not look like the window is created with that size.
How should the line look like to take the special macros into account and occupy, say 80% of the current screen?
Currently the window is only horizontally sizeable, what can be done about this?
Working with simple "<rectangle/>" did give some extra space, but that was not filled with data and made the window look ugly..

Re: Listview visible entries

Posted: Sat Feb 01, 2014 12:30 pm
by GMKai
Result of "mui.get" gives:
h/w 371 573
as windowsize

Re: Listview visible entries

Posted: Sat Feb 01, 2014 12:33 pm
by airsoftsoftwair
If the window is not vertically sizeable, then you'll first have to find out what gadget is blocking vertical resizing. There must be some general problem in your window layout because normally a listview gadget is sizeable in all directions so once your window contains a listview gadget it should be sizeable in all directions too. If that isn't the case, then something is wrong in your window layout. That also explains why Window.Height doesn't work... this attribute will of course only work if the window is sizeable on the y-axis.

The special macros are used like this:

Code: Select all

<window height="screen:80"> 
This will make the window occupy 80% of the screen's vertical space but of course it'll only work if your window is resizeable on the y-axis.

Re: Listview visible entries

Posted: Mon Feb 03, 2014 10:06 am
by GMKai
still struggling with sizeability of my window,
does Group.SameSize influence this, or does it only give a hint for rendering?

Re: Listview visible entries

Posted: Mon Feb 03, 2014 11:27 pm
by airsoftsoftwair
Group.SameSize normally doesn't have anything to do with it. If you can't find what is causing the problem, just start with a window that only contains a single listview and then add other elements one by one. Then you should be able to tell what is causing the problem...

Re: Listview visible entries

Posted: Tue Feb 04, 2014 6:38 pm
by GMKai
I can cure the misbehaviour by using <rectangle/>,
but as I know hunt down multiple spaces, can you elaborate on it's usage?
Its affecting windowsize by occuping relatively large space.
Can Rectangle be used to get resizability and set the size to 0?

Re: Listview visible entries

Posted: Wed Feb 05, 2014 4:24 pm
by airsoftsoftwair
Rectangle just adds empty padding space. It should not be necessary with listviews at all because listviews are normally sizeable in all directions. Rectangles are used with radio objects which are not resizeable but for listviews you shouldn't have to use rectangle padding.

Re: Listview visible entries

Posted: Sun Feb 09, 2014 12:32 pm
by GMKai
now I am really close to a good polished finish.

here is a snapshot of current window:

[img]
https://www.dropbox.com/s/1lb3k42oe170f4c/Grab.png?m=
[/img]

current xml:

Code: Select all

<vgroup	id="ClubSelection" title="ClubSelection" frame="group" frametitle="ClubSelection"	background="groupback">
				<rectangle FixHeight="0"/>
				<hgroup>
					<rectangle FixHeight="0"/>
					<button	id="btshowclubdetails"		notify="pressed">\33A[13]ShowClubDetails</button>
					<button	id="btclearclubselection"	notify="pressed">\33A[19]ClearSelection</button>
					<button	id="btgotomain7"			notify="pressed">\33A[9]main</button>
					<rectangle FixHeight="0"/>
				</hgroup>
				<hgroup>
					<rectangle FixHeight="0"/>
					<vgroup	id="listofleagues" disabled="false"	frame="group"	frametitle="Leaguelist">
						<listview	id="leaguelist"	autovisible="true" MultiSelect="None"	frame="InputList"	notify="active">
							<column	title="ID"></column>
							<column	title="Name"></column>
							<column	title="Nation"></column>
						</listview>
					</vgroup>
					<vgroup	id="listofclubs" disabled="false"	frame="group"	frametitle="Clublist">
						<listview	id="clublist"	autovisible="true" MultiSelect="None"	frame="InputList"	notify="active">
							<column	title="ID"></column>
							<column	title="Name"></column>
							<column	title="League"></column>
							<column	title="Account"></column>
							<column	title="Stadium"></column>
						</listview>
					</vgroup>
					<rectangle FixHeight="0"/>
				</hgroup>
				<rectangle FixHeight="0"/>
			</vgroup>    
My window is now fully resizeable,
but there is too much space left unfilled...