Listview visible entries

Discuss GUI programming with the MUI Royale plugin here
GMKai
Posts: 140
Joined: Mon Feb 15, 2010 10:58 am

Listview visible entries

Post 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?
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Listview visible entries

Post by airsoftsoftwair »

Yes, this is usually done by setting an appropriate window height.
GMKai
Posts: 140
Joined: Mon Feb 15, 2010 10:58 am

Re: Listview visible entries

Post 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..
GMKai
Posts: 140
Joined: Mon Feb 15, 2010 10:58 am

Re: Listview visible entries

Post by GMKai »

Result of "mui.get" gives:
h/w 371 573
as windowsize
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Listview visible entries

Post 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.
GMKai
Posts: 140
Joined: Mon Feb 15, 2010 10:58 am

Re: Listview visible entries

Post by GMKai »

still struggling with sizeability of my window,
does Group.SameSize influence this, or does it only give a hint for rendering?
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Listview visible entries

Post 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...
GMKai
Posts: 140
Joined: Mon Feb 15, 2010 10:58 am

Re: Listview visible entries

Post 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?
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Listview visible entries

Post 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.
GMKai
Posts: 140
Joined: Mon Feb 15, 2010 10:58 am

Re: Listview visible entries

Post 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...
Post Reply