It is currently Sat Dec 05, 2020 6:00 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: ExplorerListGadget NewColumn Error
PostPosted: Fri Sep 18, 2020 3:40 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jan 12, 2004 11:40 pm
Posts: 777
Location: Okazaki, JAPAN
PB5.71 PB5.72 , Invalid Memory access. Read Error
Windows 10 trouble?

Is this a bug or is it a rule?
How do I get the count of columns?
Code:
OpenWindow(0, 0, 0, 800, 600, "ExplorerListGadget")
ExplorerListGadget(1, 10, 10, 780, 580, GetUserDirectory(#PB_Directory_Musics)+"*.wav")
; RemoveGadgetColumn(1, 0)
; RemoveGadgetColumn(1, 0)
; RemoveGadgetColumn(1, 0)
; RemoveGadgetColumn(1, 0)
RemoveGadgetColumn(1, #PB_All)
AddGadgetColumn(1, 0, "Invalid Memory Error", 759)
Repeat
  Delay(1)
Until WindowEvent()=#PB_Event_CloseWindow
End


Thanks your VOICE
Code:
; https://www.purebasic.fr/english/viewtopic.php?f=13&t=68928&hilit=ExplorerListGadget
; Thanks RASHAD
OpenWindow(0, 0, 0, 800, 600, "ExplorerListGadget")
ExplorerListGadget(1, 10, 10, 780, 580, GetUserDirectory(#PB_Directory_Musics)+"*.flac")
; SetGadgetAttribute(1, #PB_Explorer_DisplayMode, #PB_Explorer_List)
Header = SendMessage_(GadgetID(1), #LVM_GETHEADER, 0, 0)
ColCount = SendMessage_(Header,  #HDM_GETITEMCOUNT, 0, 0)
For Count=ColCount To 2 Step -1
  RemoveGadgetColumn(1, 1)
Next
SetGadgetItemAttribute(1, 0, #PB_Explorer_ColumnWidth, 759)
SetGadgetItemText(1, -1, "Music files <Un-selected plays all songs> <Selected by ctrl or shift is song select> <wav flac mp3 cda>" , 0)
Repeat
  Delay(1)
Until WindowEvent()=#PB_Event_CloseWindow
End


Thank you.


Top
 Profile  
Reply with quote  
 Post subject: Re: ExplorerListGadget NewColumn Error
PostPosted: Fri Sep 18, 2020 8:52 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3739
According to the manual it's a bug
Quote:
The column to remove (the first column has index 0). #PB_All can be used to remove all the columns.

Workaround for time being
Code:
OpenWindow(0, 0, 0, 800, 600, "ExplorerListGadget")
ExplorerListGadget(1, 10, 10, 780, 580, GetUserDirectory(#PB_Directory_Musics)+"*.wav")

Repeat
  Result$ = GetGadgetItemText(1,-1,0)
  If Result$ <> ""
    RemoveGadgetColumn(1,0)
  Else
    Break
  EndIf
ForEver
AddGadgetColumn(1, 0, "Invalid Memory Error", 759)
Repeat
  Delay(1)
Until WindowEvent()=#PB_Event_CloseWindow
End

_________________
Egypt my love


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 61 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye