sortable depending on other attributes

Discuss GUI programming with the RapaGUI plugin here
Post Reply
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

sortable depending on other attributes

Post by amyren »

In a listview I have multiple colums set as sortable and a few of them also set as ediable.
But if I remove the editable attribiute from all colums, then the sorting stops working.

To recreate, take the RapaGUI example Dialogs and edit the Dialogs.xml like this

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app">
	
	<menubar id="menubar">
		
		<menu title="_File">
			<item id="mn_prgbar">Test _progress bar dialog...</item>
			<item/>
			<item id="mn_exit" type="quit">E_xit</item>
		</menu>		
	</menubar>
					
	<window id="win" title="Dialogs" width="640" height="400" menubar="menubar" singlemenu="true">
		<vgroup>
			<listview id="lv" notify="active">
				<column title="Select" />
				<column title="Last name" sortable="true"/>
				<column title="First name" sortable="true"/>
				<column title="Street" sortable="true"/>
				<column title="City" sortable="true"/>
				<column title="ZIP"  sortable="true"/>								
				<column title="Country" sortable="true"/>
			</listview>
			
			<hgroup>
				<button id="add">Add</button>
				<button id="edit" disabled="true">Edit</button>
				<button id="mvup" disabled="true">Move up</button>
				<button id="mvdown" disabled="true">Move down</button>
				<button id="rem" disabled="true">Remove</button>
			</hgroup>			
		</vgroup>
	</window>		
</application>
Sorting will work if editable="true" is set on any of the columns, or if the checkbox="true" is present. Also setting align="right" to any column works as well.
User avatar
airsoftsoftwair
Posts: 5441
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: sortable depending on other attributes

Post by airsoftsoftwair »

Which platform is this? With RapaGUI it's really essential to always mention the platform that shows the behaviour because RapaGUI has lots of different backends.
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: sortable depending on other attributes

Post by amyren »

Initially this is on Windows 11 x64, but I also compiled executable for 68k and MOS to test under MorphOS and there are similar issues also.

Although a bit differen results.
Just having the sortable attribute set for all columns and then sorting is totallt disabled on both MOS/68k and Windows.
If I set the align="right" on just the ZIP column, then sorting starts to work for all columns on windows. For MOS/68k sorting works, but only for the ZIP column.
amyren
Posts: 361
Joined: Thu May 02, 2019 11:53 am

Re: sortable depending on other attributes

Post by amyren »

Just tested the 68k executables under AmiKit (winuae) and then this works similar as on windows.
Post Reply