Capture one line en ListIconGadget

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Manolo.

Hi,
How I can capture one selected line into of ListIconGadget?
Thanks
Manolo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

That would be very nice, yep! Any tips and tricks? I'm also intrested in it.

Mike

Tranquilizer/ Secretly!
Registred PureBasic User
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.


Here is a little procedure:

Code: Select all

Procedure.s GetListIconGadgetText(*List, Index, Column)

  Element.LV_ITEM2\mask = #LVIF_TEXT
  Element\iItem = Index
  Element\iSubItem = Column
  Element\pszText = AllocateMemory(0, 1000, 0)
  Element\cchTextMax = 1000
  
  SendMessage_(*List, #LVM_GETITEM, 0, @Element)
  
  Result$ = PeekS(UseMemory(0))
  FreeMemory(0)
  
  ProcedureReturn Result$
EndProcedure

Just get the listicon pointer with and pass it to this procedure..

*List = ListIconGadget()...

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

You might want to check out FangBeasts iCat program (located on the PB Resources Site). He makes good use of this routine.
Post Reply