PB LTS 6.0 - #PB_Explorer_NoFiles always added when switching from form view to code

Post bugs related to the IDE here
pamen
Enthusiast
Enthusiast
Posts: 173
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

PB LTS 6.0 - #PB_Explorer_NoFiles always added when switching from form view to code

Post by pamen »

Hi
When switching from form view to code view, each time the explorer list gets automatically #PB_Explorer_NoFiles flag, when other flags are used.
This means, that each time one opens the project or file, the flag is added (as PB opens form view first) and obviously after compiling without correcting the designer code no files are shown.
Only on Windows (Linux and Raspberry seem not to add #PB_Explorer_NoFiles, Mac not tested)

Offending line:

Code: Select all

  ListViewMain = ListIconGadget(#PB_Any, 300, 40, 950, 310, "", 34, #PB_ListIcon_MultiSelect | #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_HeaderDragDrop | #PB_ListIcon_AlwaysShowSelection)
Test Form to reproduce the issue:

Code: Select all

;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;

Global Window_0

Global Tree_0, ListViewMain, Panel_0, ExplorerList_Att, WebView_0, Editor_Email, Container_0, ButtonImage_0, Text_Search, Combo_Search, Checkbox_AllFolders, Container_3, String_CC, Text_3, String_TO, Text_2, String_Date, Text_1, String_Subject, String_2, ButtonImage_cert, String_From, String_1


Procedure OpenWindow_0(x = 0, y = 0, width = 1250, height = 770)
  Window_0 = OpenWindow(#PB_Any, x, y, width, height, "NAMH", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
  CreateStatusBar(0, WindowID(Window_0))
  AddStatusBarField(#PB_Ignore)
  StatusBarText(0, 0, "Email Client Loading")
  AddStatusBarField(300)
  StatusBarProgress(0, 1, 0)
  AddStatusBarField(300)
  StatusBarText(0, 2, ".")
  Tree_0 = TreeGadget(#PB_Any, 0, 9, 290, 727, #PB_Tree_AlwaysShowSelection)
  ListViewMain = ListIconGadget(#PB_Any, 300, 40, 950, 310, "", 34, #PB_ListIcon_MultiSelect | #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_HeaderDragDrop | #PB_ListIcon_AlwaysShowSelection)
  AddGadgetColumn(ListViewMain, 1, "Date", 120)
  AddGadgetColumn(ListViewMain, 2, "From", 120)
  AddGadgetColumn(ListViewMain, 3, "Subject", 220)
  AddGadgetColumn(ListViewMain, 4, "CC", 100)
  AddGadgetColumn(ListViewMain, 5, "TO", 100)
  AddGadgetColumn(ListViewMain, 6, "Size", 60)
  AddGadgetColumn(ListViewMain, 7, "Attachments", 60)
  AddGadgetColumn(ListViewMain, 8, "Signed", 60)
  AddGadgetColumn(ListViewMain, 9, "SignedBy", 80)
  AddGadgetColumn(ListViewMain, 10, "Folder", 100)
  AddGadgetColumn(ListViewMain, 11, "Acc.No", 20)
  Panel_0 = PanelGadget(#PB_Any, 300, 430, 940, 310)
  AddGadgetItem(Panel_0, -1, "HTML")
  ExplorerList_Att = ExplorerListGadget(#PB_Any, 780, 0, 160, 298, "Attachments", #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)
  WebView_0 = WebGadget(#PB_Any, 10, 10, 760, 258, "")
  AddGadgetItem(Panel_0, -1, "Plain text", 0, 1)
  Editor_Email = EditorGadget(#PB_Any, 10, 0, 930, 270, #PB_Editor_ReadOnly | #PB_Editor_WordWrap)
  CloseGadgetList()
  Container_0 = ContainerGadget(#PB_Any, 300, 10, 940, 25)
  ButtonImage_0 = ButtonImageGadget(#PB_Any, 700, 0, 30, 25, 0)
  Text_Search = StringGadget(#PB_Any, 220, 0, 380, 25, "Search")
  Combo_Search = ComboBoxGadget(#PB_Any, 0, 0, 210, 25)
  Checkbox_AllFolders = CheckBoxGadget(#PB_Any, 610, 0, 80, 25, "All Folders")
  CloseGadgetList()
  Container_3 = ContainerGadget(#PB_Any, 300, 360, 950, 70)
  String_CC = StringGadget(#PB_Any, 480, 30, 450, 25, "", #PB_String_ReadOnly | #PB_String_BorderLess)
  SetGadgetColor(String_CC, #PB_Gadget_FrontColor,RGB(0,0,128))
  Text_3 = StringGadget(#PB_Any, 430, 30, 40, 25, "CC:", #PB_String_ReadOnly | #PB_String_BorderLess)
  DisableGadget(Text_3, 1)
  String_TO = StringGadget(#PB_Any, 660, 0, 270, 25, "", #PB_String_ReadOnly | #PB_String_BorderLess)
  SetGadgetColor(String_TO, #PB_Gadget_FrontColor,RGB(0,0,128))
  Text_2 = StringGadget(#PB_Any, 620, 0, 30, 25, "To:", #PB_String_ReadOnly | #PB_String_BorderLess)
  DisableGadget(Text_2, 1)
  String_Date = StringGadget(#PB_Any, 480, 0, 120, 25, "", #PB_String_ReadOnly | #PB_String_BorderLess)
  Text_1 = StringGadget(#PB_Any, 430, 0, 40, 25, "Sent:", #PB_String_ReadOnly | #PB_String_BorderLess)
  DisableGadget(Text_1, 1)
  String_Subject = StringGadget(#PB_Any, 70, 30, 330, 25, "", #PB_String_ReadOnly | #PB_String_BorderLess)
  String_2 = StringGadget(#PB_Any, 10, 30, 50, 25, "Subject:", #PB_String_ReadOnly | #PB_String_BorderLess)
  DisableGadget(String_2, 1)
  ButtonImage_cert = ButtonImageGadget(#PB_Any, 390, 0, 22, 22, 0)
  String_From = StringGadget(#PB_Any, 70, 0, 310, 25, "", #PB_String_ReadOnly | #PB_String_BorderLess)
  String_1 = StringGadget(#PB_Any, 10, 0, 50, 25, "From:", #PB_String_ReadOnly | #PB_String_BorderLess)
  DisableGadget(String_1, 1)
  CloseGadgetList()
EndProcedure
S.T.V.B.E.E.V.