ListIconGadget

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

ListIconGadget

Post by Little John »

After running the following code, press [A], [ B ], [Shift]+[A] or [Shift]+[ B ]:
The selection jumps to an item, where the content of the first column starts with „a“ or with „b“, respectively.
(tested with PB 6.20 on Windows 11)

Maybe it's worth documenting this behaviour?

Code: Select all

If OpenWindow(0, 100, 100, 300, 130, "ListIcon demo", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) = 0
   MessageRequester("Fatal error", "Can't open main window.")
   End
EndIf

ListIconGadget(0, 5, 5, 280, 110, "Name", 100, #PB_ListIcon_FullRowSelect)
AddGadgetColumn(0, 1, "Address", 170)
AddGadgetItem(0, -1, "ax" + #LF$ + "Here")
AddGadgetItem(0, -1, "bx" + #LF$ + "There")
AddGadgetItem(0, -1, "ay" + #LF$ + "By the Bay")
AddGadgetItem(0, -1, "by" + #LF$ + "CodeCity")
SetActiveGadget(0)
SetGadgetState(0, 0)

Repeat
   event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Re: ListIconGadget

Post by AZJIO »

This has always been the case with Windows. Implicit search.

Code: Select all

If OpenWindow(0, 100, 100, 200, 730, "ListIcon demo", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	ListIconGadget(0, 5, 5, 180, 710, "Name", 80, #PB_ListIcon_FullRowSelect)
	AddGadgetColumn(0, 1, "Random", 80)
	For i = 65 To 90
		AddGadgetItem(0, -1, Chr(i) + Chr(Random(122, 65)) + #LF$ + Chr(Random(122, 65)))
	Next
	SetActiveGadget(0)
	SetGadgetState(0, 0)
	Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Quin
Addict
Addict
Posts: 1124
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: ListIconGadget

Post by Quin »

Yeah, this is super common Windows behavior. Press win+m or win+d to go to your desktop and try the same thing, or do it in Windows Explorer/Xplorer2. It's an incredibly nice accessibility feature.
The Mac, of course, gets it wrong, and at least in the Finder there's a bug with their implementation where if you press L, it takes you to the last item starting with L. Guess someone forgot a break...
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: ListIconGadget

Post by Little John »

Quin wrote: Tue Feb 18, 2025 7:10 pm Yeah, this is super common Windows behavior. Press win+m or win+d to go to your desktop and try the same thing, or do it in Windows Explorer/Xplorer2.
Interesting! I didn't know that, and so I was surprised when I encountered this behaviour.
So I posted it here in this section of the forum, because I want to raise the question whether it makes sense to mention this behaviour in the documentation of the ListIconGadget.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2137
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: ListIconGadget

Post by Andre »

As far as I remember Fred want to avoid OS-specific documentation in the (cross-platform) docs...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: ListIconGadget

Post by Little John »

Hello André,

on the one hand, I can understand that. On the other hand, it is unsatisfactory when you accidentally discover that a gadget behaves differently than expected because the property in question is not documented.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2137
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: ListIconGadget

Post by Andre »

Little John wrote: Thu Feb 20, 2025 8:32 pm on the one hand, I can understand that. On the other hand, it is unsatisfactory when you accidentally discover that a gadget behaves differently than expected because the property in question is not documented.
I can understand that. It's up to Fred, what he would like to have included in the docs...
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply