Page 1 of 1

Designer adds Explorer_No_Files when switching from design to view

Posted: Sun Aug 27, 2023 2:12 pm
by pamen
In Windows, PB 6.02/03 (64 or 32 bit, probably on other OSs as well - not tested)

When ExplorerListGadget is created with below flags, Designer adds the flag No_Files as well, when switching to code view, so afterwards nothing is visible, while files should be visible.

Code: Select all

ExplorerList1 = ExplorerListGadget(#PB_Any, 0, 0, 940, 348, "Only Files Explorer", #PB_Explorer_NoMyDocuments | #PB_Explorer_BorderLess | #PB_Explorer_AlwaysShowSelection | #PB_Explorer_MultiSelect | #PB_Explorer_GridLines | #PB_Explorer_FullRowSelect | #PB_Explorer_NoFolders | #PB_Explorer_NoParentFolder | #PB_Explorer_AutoSort)

Re: Designer adds Explorer_No_Files when switching from design to view

Posted: Tue Aug 29, 2023 1:34 pm
by spikey
Confirmed on 6.02 LTS and 6.03B5. It seems to be the switch back from code to design view which causes the problem. The flag is also set when you open a form file saved without it.

Okay, the problem is caused by extraneous matching in the OpenReadGadgetFlags() procedure, with the root cause being the iValues field in the Gadgets()\Flags() list defined in 'declare.pb'. Some of the #PB_Explorer_* flags appear two or three times in this table but with different iValues, for example #PB_Explorer_NoMyDocuments appears in ExplorerCombo (1 << 2), ExplorerList (1 << 0) and ExplorerTree (1 << 6). The extraneous matching in OpenReadGadgetFlags picks up all the different possible iValues which then causes other flags to be set erroneously when the properties list is updated.

Re: Designer adds Explorer_No_Files when switching from design to view

Posted: Sat Jul 05, 2025 4:03 pm
by spikey
Proposed fix in PR #322.