ExplorerListGadget

Post bugs related to the IDE here
RSrole
User
User
Posts: 71
Joined: Fri Apr 29, 2022 8:27 pm

ExplorerListGadget

Post by RSrole »

Every once in awhile the ExplorerListGadget will change it's flags so the borderless and nofiles are set, even though I never click on those checkboxes in the ide. I haven't found a pattern or some order of operations that causes this, but if I do, I'll post it here.
Marc56us
Addict
Addict
Posts: 1600
Joined: Sat Feb 08, 2014 3:26 pm

Re: ExplorerListGadget

Post by Marc56us »

Yes, I've noticed this in FormDesigner with this gadget: when you switch several times from Code mode to Design mode, some constants check or uncheck for no reason (i.e. #PB_Explorer_BorderLess).
RSrole
User
User
Posts: 71
Joined: Fri Apr 29, 2022 8:27 pm

Re: ExplorerListGadget

Post by RSrole »

fyi, for a short or longer term solution,

Code: Select all

FreeGadget(SourceList)
SourceList = ExplorerListGadget(#PB_Any, 10, 30, 220, 220, "", #PB_Explorer_AlwaysShowSelection | #PB_Explorer_MultiSelect | #PB_Explorer_GridLines | #PB_Explorer_FullRowSelect | #PB_Explorer_AutoSort)
SetGadgetFont(SourceList, FontID(#Font_Window_0_2))
or whatever values work for you. This way if the designer messes me up, I'm still good
Marc56us
Addict
Addict
Posts: 1600
Joined: Sat Feb 08, 2014 3:26 pm

Re: ExplorerListGadget

Post by Marc56us »

RSrole wrote: Sat Mar 15, 2025 9:49 pm fyi, for a short or longer term solution,

Code: Select all

FreeGadget(SourceList)
SourceList = ExplorerListGadget(#PB_Any, 10, 30, 220, 220, "", #PB_Explorer_AlwaysShowSelection | #PB_Explorer_MultiSelect | #PB_Explorer_GridLines | #PB_Explorer_FullRowSelect | #PB_Explorer_AutoSort)
SetGadgetFont(SourceList, FontID(#Font_Window_0_2))
or whatever values work for you. This way if the designer messes me up, I'm still good
Thanks for the suggestion.
(however, we must remember to modify this line if we change the position or size in the form)
RSrole
User
User
Posts: 71
Joined: Fri Apr 29, 2022 8:27 pm

Re: ExplorerListGadget

Post by RSrole »

If you want to be more generic, you should get and save the gadgetx, gadgety,gadgetWidth and gadgetHeight before freeing it, then use those values. That way you can move things around in the designer and don't have to worry about changing the example code. My guess is that Fred will find the bug and fix it before too long.
User avatar
spikey
Enthusiast
Enthusiast
Posts: 749
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: ExplorerListGadget

Post by spikey »

With any luck this is fixed by PR #322, too.
Post Reply