It is currently Tue Jul 23, 2019 2:17 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Get entire ListIconGadget item row
PostPosted: Thu Jun 13, 2019 2:32 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Apr 18, 2019 8:17 am
Posts: 206
My wish is for the GetGadgetItemText() command to support a column value of -1, which means to return all columns together, with #LF$ separating them. This means we can easily pluck an item row and add it to another ListIconGadget() easily, without manually getting the item text from each column (of which there may be lots):

Code:
If OpenWindow(0, 100, 100, 300, 100, "ListIcon Example", #PB_Window_SystemMenu)
  ListIconGadget(0, 5, 5, 290, 90, "Name", 100, #PB_ListIcon_FullRowSelect)
  AddGadgetColumn(0, 1, "Age", 50)
  AddGadgetColumn(0, 2, "Address", 250)
  AddGadgetItem(0, -1, "Harry Rannit" + #LF$ + "25" + #LF$ + "12 Parliament Way")
  Repeat
    Event = WaitWindowEvent()
    If Event = #PB_Event_Gadget And EventType()=#PB_EventType_LeftClick
      item = GetGadgetState(0)
      Debug GetGadgetItemText(0, item) ; "Harry Rannit" only is returned. :(
      ; WISH: Debug GetGadgetItemText(0, item, -1) ; -1 would return "Harry Rannit"+#LF$+"25"+#LF$+"12 Parliament Way"
    EndIf
  Until Event = #PB_Event_CloseWindow
EndIf


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 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