Page 2 of 2

Re: Listviewcolumn.Hide is not work

Posted: Fri Sep 03, 2021 11:34 pm
by mrupp
This has been fixed in RapaGUI 2.0 for mac-x64, but is still the case for mac-ppc:

Image Image

Please also note the blank space at the bottom of the scrollbars (in dataview mode) for mac-ppc, only after the window is resized, they are painted correctly.

Example script:

Code: Select all

@REQUIRE "RapaGUI", {Link = True}
@APPTITLE "ListView-Test"

Function p_EventFunc(msg)
	DebugPrint(msg.id, msg.Attribute)
	If msg.Attribute = "DoubleClick"
		Local activeObject = moai.Get("mainWindow", "activeObject")
		moai.Set("lblInfo", "text", activeObject)
		DebugPrint("activeObject:", activeObject)
	EndIf
EndFunction

moai.CreateApp([[<?xml version="1.0" encoding="iso-8859-1"?>
	<application id="app">
		<window id="mainWindow" title="ListView-Test">
			<vgroup>
				<text id="lblInfo">Double click on an item to get the currently active object</text>
				<hgroup frame="true" frametitle="Listview1 in listview mode">
					<listview id="listview1" notify="doubleclick" forceMode="listview">
						<column title="ID" />
						<column title="Text" />
					</listview>	
				</hgroup>	
				<hgroup frame="true" frametitle="Listview2 in dataview mode">
					<listview id="listview2" notify="doubleclick" forceMode="dataview">
						<column title="ID" />
						<column title="Text" />
					</listview>	
				</hgroup>	
				<hgroup frame="true" frametitle="Listview3 with hidden column">
					<listview id="listview3" notify="doubleclick">
						<column hide="true" />
						<column title="Text" />
					</listview>	
				</hgroup>	
			</vgroup>				
		</window>
	</application>
]])
InstallEventHandler({RapaGUI = p_EventFunc})

For Local i = 0 To 100
	moai.DoMethod("listview1", "insert", "bottom", i, "Item " .. i)
	moai.DoMethod("listview2", "insert", "bottom", i, "Item " .. i)
	moai.DoMethod("listview3", "insert", "bottom", i, "Item " .. i)
Next

Repeat
	 WaitEvent
Forever
Cheers, Michael

Re: Listviewcolumn.Hide is not work

Posted: Mon Sep 06, 2021 9:39 pm
by airsoftsoftwair
mrupp wrote:
Fri Sep 03, 2021 11:34 pm
This has been fixed in RapaGUI 2.0 for mac-x64, but is still the case for mac-ppc:
Yeah, that's a known issue, among many others in the Mac PPC version :) Background: The Mac PPC version uses an outdated version of wxWidgets because newer wxWidgets versions obviously don't work with 10.5 anymore so I'd have to backport all those fixes to that old wxWidgets version and I'm not too keen on doing this because AFAICS there are hardly any people using it so this doesn't have a very high priority here.

Re: Listviewcolumn.Hide is not work

Posted: Sun Oct 24, 2021 3:44 pm
by airsoftsoftwair
Well, for what it's worth, here is a fix for that as well. You were lucky because hiding columns is a feature introduced in macOS 10.5 so it's possible to support it in RapaGUI as well.

Code: Select all

- Fix [macOS/PPC]: Setting Listviewcolumn.Hidden didn't hide the listview column

Re: Listviewcolumn.Hide is not work

Posted: Mon Oct 25, 2021 11:49 pm
by mrupp
airsoftsoftwair wrote:
Sun Oct 24, 2021 3:44 pm
Well, for what it's worth, here is a fix for that as well. You were lucky because hiding columns is a feature introduced in macOS 10.5 so it's possible to support it in RapaGUI as well.

Code: Select all

- Fix [macOS/PPC]: Setting Listviewcolumn.Hidden didn't hide the listview column
And it works like a charm with RP 2.1. Andreas, you’re the best!