Page 1 of 1

sortable depending on other attributes

Posted: Tue Apr 02, 2024 6:07 pm
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.

Re: sortable depending on other attributes

Posted: Mon Apr 08, 2024 7:50 pm
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.

Re: sortable depending on other attributes

Posted: Tue Apr 09, 2024 11:13 am
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.

Re: sortable depending on other attributes

Posted: Tue Apr 09, 2024 2:39 pm
by amyren
Just tested the 68k executables under AmiKit (winuae) and then this works similar as on windows.

Re: sortable depending on other attributes

Posted: Sun Apr 14, 2024 11:14 am
by airsoftsoftwair
Ok, I'll take a look.