It is currently Fri Jan 15, 2021 3:05 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 439 posts ]  Go to page Previous  1 ... 25, 26, 27, 28, 29, 30  Next
Author Message
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Apr 12, 2012 7:06 pm 
Offline
New User
New User

Joined: Thu Feb 17, 2011 11:08 pm
Posts: 5
Hi gnozal
I tried changing callback
Code:
Procedure MyFilterCallback(GadgetNumber.l, FilterString.s, ListIconColumn.l, EventCode.l) ; simple filter example
  Shared *ListBuffer
  If EventCode = #PureLVSORT_FilterChange
    If *ListBuffer
      PureLVSORT_LoadListIconFromMem(GadgetNumber, *ListBuffer, FilterString, ListIconColumn, #True)
      *ListBuffer = PureLVSORT_SaveListIconToMem(GadgetNumber)
    EndIf
  EndIf
EndProcedure

this is works on two columns but only on 1 letter
maybe possible to refine this code?

p.s. Sorry for my english .


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Apr 13, 2012 10:51 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
kosjachok wrote:
Hi gnozal
I tried changing callback
It won't work like this, you are overwriting the same buffer (*ListBuffer) each time.
You have to use a new buffer each time the filter changes.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Jun 01, 2012 5:32 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4597
Location: Not Sydney!!! (Bad water, no goats)
I have a ListIconGadget setup with 3 columns icons in column 0 with text and I issue a PureLVSORT_SortListIconNow after I add an item.

All icons disappear when I do that.

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Jun 01, 2012 8:12 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
Fangbeast wrote:
I have a ListIconGadget setup with 3 columns icons in column 0 with text and I issue a PureLVSORT_SortListIconNow after I add an item.
All icons disappear when I do that.
Seems to work here.
Code:
#Window_0 = 0
#ListIcon_0 = 0
Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 0, 602, 302, "PureLVSORT V2 Test", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
    ListIconGadget(#ListIcon_0, 5, 5, 590, 285, "String", 110)
    AddGadgetColumn(#ListIcon_0, 1, "Numeric", 110)
    AddGadgetColumn(#ListIcon_0, 2, "Float", 110)
    AddGadgetColumn(#ListIcon_0, 3, "DateDDMMYYYY", 120)
    AddGadgetColumn(#ListIcon_0, 4, "DateMMDDYYYY", 120)
    AddGadgetColumn(#ListIcon_0, 5, "FileSize", 120)
    AddGadgetColumn(#ListIcon_0, 6, "NoSorting", 120)
    AddGadgetItem(#ListIcon_0, -1, "ABCDE" + Chr(10) + "514" + Chr(10) + "0.9" + Chr(10) + "31/12/2004" + Chr(10) + "12/31/2004" + Chr(10) + "15.02 MB" + Chr(10) + "0", LoadImage(0, #PB_Compiler_Home + "Examples\Sources\Data\CdPlayer.ico"))
    AddGadgetItem(#ListIcon_0, -1, "ACDEF" + Chr(10) + "118" + Chr(10) + "1.9" + Chr(10) + "11/12/2004" + Chr(10) + "12/11/2004"  + Chr(10) + "65 B" + Chr(10) + "1")
    AddGadgetItem(#ListIcon_0, -1, "ZABCD" + Chr(10) + "-414" + Chr(10) + "7.0" + Chr(10) + "21/01/2003" + Chr(10) + "01/21/2003" + Chr(10) + "5.98 GB" + Chr(10) + "3")
    AddGadgetItem(#ListIcon_0, -1, "DEFGH" + Chr(10) + "524" + Chr(10) + "900" + Chr(10) + "10/06/2001" + Chr(10) + "06/10/2001" + Chr(10) + "100 KB" + Chr(10) + "A", LoadImage(1, #PB_Compiler_Home + "Examples\Sources\Data\CdPlayer.ico"))
  EndIf
EndProcedure
Open_Window_0()
; ListIcon Sort Setup
If PureLVSORT_SelectGadgetToSort(#ListIcon_0, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
  PureLVSORT_SetColumnType(#ListIcon_0, 0, #PureLVSORT_String) ; default, not necessary
  PureLVSORT_SetColumnType(#ListIcon_0, 1, #PureLVSORT_Numeric)
  PureLVSORT_SetColumnType(#ListIcon_0, 2, #PureLVSORT_Float)
  PureLVSORT_SetColumnType(#ListIcon_0, 3, #PureLVSORT_DateDDMMYYYY)
  PureLVSORT_SetColumnType(#ListIcon_0, 4, #PureLVSORT_DateMMDDYYYY)
  PureLVSORT_SetColumnType(#ListIcon_0, 5, #PureLVSORT_FileSize)
  PureLVSORT_SetColumnType(#ListIcon_0, 6, #PureLVSORT_NoSorting)
  PureLVSORT_SortListIconNow(#ListIcon_0, 1, -1) ;<------
EndIf
;
PureLVSORT_SetColumnAlignment(#ListIcon_0, 5, #PureLVSORT_Right)
;
Repeat
  Debug "ClickedColumn / SortingDirection"
  Debug PureLVSORT_GetClickedColumn(#ListIcon_0)
  Debug PureLVSORT_GetSortingDirection(#ListIcon_0)
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
End

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Jun 01, 2012 1:27 pm 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4597
Location: Not Sydney!!! (Bad water, no goats)
Strange. Just one of those things I guess.

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Jun 06, 2012 12:23 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 625
Location: France
PureLVSORT is awesome and I thank you for this plugin but apparently it is not possible to obtain the number of column / row when testing the event and # # PureLVSORT_EditEnd PureLVSORT_EditEscape.
Code:
;Test PureLVSORT
;PB 4.61

Enumeration
  #FontApp
  #Mainform
  #Table
  #TotQte
EndEnumeration

Global TotQte.i
Global Mois.s="Janvier|Février|Mars|Avril|Mai|juin"

Declare.L Edit_Callback(Event.l, ListIconNumber.l, Column.l, Row.l, Text.s)
Declare GetTotalQty()
Declare Open_MainForm()


Procedure.l Edit_Callback(Event.l, ListIconNumber.l, Column.l, Row.l, Text.s)
  Select Event
    Case #PureLVSORT_EditStart
      Debug "#PureLVSORT_EditStart"
      Select Column
        Case 0 ;Colonne 1 on peut choisir un mois (defilement des fleches)
          ProcedureReturn @"Janvier|Février|Mars|Avril|Mai|Juin"
         
        Case 1 ;Quantité de 1 à 10
          ProcedureReturn @"1|2|3|4|5|6|7|8|9|10"
         
        Case 2 ;Texte libre
          ProcedureReturn 0
         
      EndSelect
 
    Case #PureLVSORT_EditText
      Debug "#PureLVSORT_EditText"
      Debug "Column :" + Str(Column) + " - "  + Str(Column) ;Strange !! Column=-1 Row=-1
      If Text = "Change this text"
        ProcedureReturn @"to another text"
      EndIf
     
    Case #PureLVSORT_EditEnd
      Debug "#PureLVSORT_EditEnd"
      Debug "Column :" + Str(Column) + " - "  + Str(Column) ;Strange !! Column=-1 Row=-1
      GetTotalQty()
           
    Case #PureLVSORT_EditEscape
      Debug "#PureLVSORT_EditEscape"
      Debug "Column :" + Str(Column) + " - "  + Str(Column) ;Strange !! Column=-1 Row=-1
      ProcedureReturn @Text ; On retourne le texte initiale
     
  EndSelect
EndProcedure


;Recalcul les quantités
Procedure GetTotalQty()
  TotQte=0
  For i=0 To CountGadgetItems(#Table)-1
    TotQte+Val(GetGadgetItemText(#Table,i,1))
  Next
  SetGadgetText(#TotQte, Str(TotQte)) 
EndProcedure


;Fenetre principale
Procedure Open_MainForm()
  LoadFont(#FontApp,"Arial",11)
  SetGadgetFont(#PB_Default,FontID(#FontApp))

  OpenWindow(#Mainform, 0, 0, 500, 400, "Test PureLVSORT")
  ListIconGadget(#Table, 10,10,480,200,"Mois",100, #PB_ListIcon_FullRowSelect)
  AddGadgetColumn(#Table,1,"Qté.",50)
  AddGadgetColumn(#Table,2,"Observation.",200)
  TextGadget(#PB_Any, 10, 220, 100, 20, "Total Quantité : ")
  TextGadget(#TotQte, 110, 220, 50, 22, "0")
 
  ;Un peu de remplissage
  For row=0 To 5
    AddGadgetItem(#Table, -1, StringField(Mois,Row+1,"|") + Chr(10)+Str(Row))
  Next
  GetTotalQty()

  ;Utilisation de PureLVSORT
  If PureLVSORT_SelectGadgetToSort(#Table, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
    PureLVSORT_SetColumnType(#Table, 0, #PureLVSORT_String) 
    PureLVSORT_SetColumnType(#Table, 1, #PureLVSORT_Float) 
    PureLVSORT_SetColumnAlignment(#Table, 1, #PureLVSORT_Right)
 
    PureLVSORT_MakeColumnEditable(#Table, 0, #True)
    PureLVSORT_MakeColumnEditable(#Table, 1, #True)
    PureLVSORT_MakeColumnEditable(#Table, 2, #True)
   
    PureLVSORT_SetEditingColors($DEF4F8, $000000)
    PureLVSORT_SetEditingCallback(@Edit_Callback())
  EndIf
 
 
EndProcedure


Open_MainForm()


Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
      Select EventGadget()
         
      EndSelect
       
    Case #PB_Event_CloseWindow
      End
  EndSelect
 
ForEver

I hope I understand the operation of this library :)

_________________

➽ Windows 10 - PB 5.73(x64)

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Jun 06, 2012 9:39 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
falsam wrote:
PureLVSORT is awesome and I thank you for this plugin but apparently it is not possible to obtain the number of column / row when testing the events #PureLVSORT_EditEnd or #PureLVSORT_EditEscape.
Yes, there is no current row or column after these events (no selected cell anymore).
If you need this information, use static variables in the callback.
Code:
Procedure.l Edit_Callback(Event.l, ListIconNumber.l, Column.l, Row.l, Text.s)
  Static LastColumn = -1, LastRow = -1
  If Column <> -1
    LastColumn = Column
  EndIf
  If Row <> -1
    LastRow = Row
  EndIf
  Select Event
    Case #PureLVSORT_EditStart
      Debug "#PureLVSORT_EditStart"
      Select Column
        Case 0 ;Colonne 1 on peut choisir un mois (defilement des fleches)
          ProcedureReturn @"Janvier|Février|Mars|Avril|Mai|Juin"
         
        Case 1 ;Quantité de 1 à 10
          ProcedureReturn @"1|2|3|4|5|6|7|8|9|10"
         
        Case 2 ;Texte libre
          ProcedureReturn 0
         
      EndSelect
     
    Case #PureLVSORT_EditText
      Debug "#PureLVSORT_EditText"
      Debug "Position :" + Str(Column) + " - "  + Str(Row)
      If Text = "Change this text"
        ProcedureReturn @"to another text"
      EndIf
     
    Case #PureLVSORT_EditEnd
      Debug "#PureLVSORT_EditEnd"
      Debug "Position :" + Str(LastColumn) + " - "  + Str(LastRow)
      GetTotalQty()
     
    Case #PureLVSORT_EditEscape
      Debug "#PureLVSORT_EditEscape"
      Debug "Position :" + Str(LastColumn) + " - "  + Str(LastRow)
      ProcedureReturn @Text ; On retourne le texte initiale
     
  EndSelect
EndProcedure

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Jun 06, 2012 8:16 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 625
Location: France
Very GooOOOD. thank you very much gnozal.

_________________

➽ Windows 10 - PB 5.73(x64)

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Jun 06, 2012 9:31 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 625
Location: France
Code:
;Test PureLVSORT
;PB 4.61

Enumeration
  #FontApp
  #Mainform
  #Table
  #TotQte
 
  #Status
EndEnumeration

Global TotQte.i, LastBuffer.s
Global Mois.s="Janvier|Février|Mars|Avril|Mai|juin"

Declare.L Edit_Callback(Event.l, ListIconNumber.l, Column.l, Row.l, Text.s)
Declare GetTotalQty()
Declare Open_MainForm()

Procedure.l Edit_Callback(Event.l, ListIconNumber.l, Column.l, Row.l, Text.s)
  Static LastColumn = -1, LastRow = -1, LastBuffer.s
  If Column <> -1
    LastColumn = Column
    LastBuffer=Text
  EndIf
  If Row <> -1
    LastRow = Row
  EndIf
   
  SetGadgetText(#Status, Str(Column)+"/"+Str(LastRow))
 
  Select Event
    Case #PureLVSORT_EditStart
      Select LastColumn
        Case 0 ;Colonne 1 on peut choisir un mois (defilement des fleches)
          ProcedureReturn @"Janvier|Février|Mars|Avril|Mai|Juin"
         
        Case 1 ;Quantité de 1 à 10
          ProcedureReturn @"1|2|3|4|5|6|7|8|9|10"
         
        Case 2 ;Texte libre
          ProcedureReturn 0
         
      EndSelect
     
    Case #PureLVSORT_EditText
      ;On transforme le texte en masjuscule en cours d'écriture
      Select LastColumn
        Case 0
         
        Case 1
         
        Case 2
          LastBuffer=UCase(LastBuffer)
          ProcedureReturn @LastBuffer
         
      EndSelect     
     
    Case #PureLVSORT_EditEnd
      ;Si une quantité est modifiée on recalcul le cumul de ces quantités
      Select LastColumn
        Case 0
         
        Case 1
          GetTotalQty()
         
        Case 2
         
      EndSelect
     
    Case #PureLVSORT_EditEscape
      ProcedureReturn @Text ; On retourne le texte initiale
     
  EndSelect
EndProcedure

;Recalcul les quantités
Procedure GetTotalQty()
  TotQte=0
  For i=0 To CountGadgetItems(#Table)-1
    TotQte+Val(GetGadgetItemText(#Table,i,1))
  Next
  SetGadgetText(#TotQte, Str(TotQte)) 
EndProcedure

;Fenetre principale
Procedure Open_MainForm()
  LoadFont(#FontApp,"Arial",11)
  SetGadgetFont(#PB_Default,FontID(#FontApp))

  OpenWindow(#Mainform, 0, 0, 500, 400, "Test PureLVSORT")
  ListIconGadget(#Table, 10,10,480,200,"Mois",100, #PB_ListIcon_FullRowSelect)
  AddGadgetColumn(#Table,1,"Qté.",50)
  AddGadgetColumn(#Table,2,"Observation.",200)
  TextGadget(#PB_Any, 10, 220, 100, 20, "Total Quantité : ")
  TextGadget(#TotQte, 110, 220, 50, 22, "0")
 
  TextGadget(#Status, 20, 350, 150, 22, "")
 
  ;Un peu de remplissage
  For row=0 To 5
    AddGadgetItem(#Table, -1, StringField(Mois,Row+1,"|") + Chr(10)+Str(Row))
  Next
  GetTotalQty()

  ;Utilisation de PureLVSORT
  If PureLVSORT_SelectGadgetToSort(#Table, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
    PureLVSORT_SetColumnType(#Table, 0, #PureLVSORT_String) 
    PureLVSORT_SetColumnType(#Table, 1, #PureLVSORT_Float) 
    PureLVSORT_SetColumnAlignment(#Table, 1, #PureLVSORT_Right)
 
    PureLVSORT_MakeColumnEditable(#Table, 0, #True)
    PureLVSORT_MakeColumnEditable(#Table, 1, #True)
    PureLVSORT_MakeColumnEditable(#Table, 2, #True)
   
    PureLVSORT_SetEditingColors($DEF4F8, $000000)
    PureLVSORT_SetEditingCallback(@Edit_Callback())
  EndIf 
EndProcedure

Open_MainForm()

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_Gadget
      Select EventGadget()
         
      EndSelect
       
    Case #PB_Event_CloseWindow
      End
  EndSelect
 
ForEver

Maybe a bug? It is possible to modify the header of a column. Click after the last row in this table.
How is it possible not to hear the beep at the end of the edit mode. thank you :)

Image

_________________

➽ Windows 10 - PB 5.73(x64)

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Jun 07, 2012 8:00 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
falsam wrote:
Maybe a bug? It is possible to modify the header of a column. Click after the last row in this table.
I have uploaded a new build.
Should be fixed.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Jun 07, 2012 1:15 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 625
Location: France
gnozal wrote:
I have uploaded a new build. Should be fixed.

Yessss ...... Fixed. Thanks.

_________________

➽ Windows 10 - PB 5.73(x64)

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Sep 27, 2012 1:43 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jun 09, 2003 8:30 am
Posts: 196
Hi Gnozal

i appreciate Your splendid libs.
When meeting in real life i pay the beer 8)

One Question to PureLVSort

Maybe i've missed something but
the doubleclick to select a element to switch to editmode is somehow annoying
because it need a mouse (of course) to do so. :D

Is it possible to switch to a kind of preeditmode , drawing a border around the
actual editable element (left upper if none) and pressing the arrowkeys select the next
editable element in column or row ?
Beginning of typing can enter the real editmode for this element
Pressing a arrowkey or enter exits editmode and switches to the next editable element
('arrow' in the direction it should and 'enter' right or down (set via switch))

I think this is a little (row and col is already known) extension this lib could bare.

maybe is it sufficient to spend a PURELVSORT_EnterEditMode (gadget,row,col).
This combined with editcallback will show the way.

_________________
사십 둘 .


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Sep 28, 2012 10:56 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
bobobo wrote:
Maybe i've missed something but the doubleclick to select a element to switch to editmode is somehow annoying
because it need a mouse (of course) to do so. :D
Yes, a mouse is mandatory to select a cell for editing.
bobobo wrote:
Is it possible to switch to a kind of preeditmode , drawing a border around the actual editable element (left upper if none) and pressing the arrowkeys select the next editable element in column or row ?...
This would mean big changes in the cell editing code, and it would probably not be as convenient / powerful as real grid libraries like EsGrid.

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Sep 28, 2012 12:36 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jun 09, 2003 8:30 am
Posts: 196
Ok .. it is as it is.

a EnterEditMode(gadget,row,col) aint possible either?

_________________
사십 둘 .


Top
 Profile  
Reply with quote  
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Sep 28, 2012 2:08 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4229
Location: Strasbourg / France
bobobo wrote:
a EnterEditMode(gadget,row,col) aint possible either?
I guess you may simulate a mouse event :
Code:
#Window_0 = 0
#ListIcon_0 = 0
Procedure Open_Window_0()
  If OpenWindow(#Window_0, 0, 0, 602, 302, "PureLVSORT Test 1",  #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_MaximizeGadget| #PB_Window_MinimizeGadget | #PB_Window_SizeGadget)
    If CreateGadgetList(WindowID(#Window_0))
      ListIconGadget(#ListIcon_0, 5, 5, 590, 255, "String", 110)
      AddGadgetColumn(#ListIcon_0, 1, "Numeric", 110)
      AddGadgetColumn(#ListIcon_0, 2, "Float", 110)
      AddGadgetColumn(#ListIcon_0, 3, "DateDDMMYYYY", 120)
      AddGadgetColumn(#ListIcon_0, 4, "DateMMDDYYYY", 120)
      AddGadgetColumn(#ListIcon_0, 5, "DateMMDDYYYY", 120)
      AddGadgetItem(#ListIcon_0, -1, "ABCDE" + Chr(10) + "514" + Chr(10) + "0.9" + Chr(10) + "31/12/2004" + Chr(10) + "12/31/2004" + Chr(10) + "12/31/2004")
      AddGadgetItem(#ListIcon_0, -1, "ACDEF" + Chr(10) + "118" + Chr(10) + "1.9" + Chr(10) + "11/12/2004" + Chr(10) + "12/11/2004" + Chr(10)+ "12/11/2004")
      AddGadgetItem(#ListIcon_0, -1, "ZABCD" + Chr(10) + "-414" + Chr(10) + "7.0" + Chr(10) + "21/01/2003" + Chr(10) + "01/21/2003" + Chr(10)+ "12/11/2004")
      AddGadgetItem(#ListIcon_0, -1, "DEFGH" + Chr(10) + "524" + Chr(10) + "900" + Chr(10) + "10/06/2001" + Chr(10) + "06/10/2001" + Chr(10)+ "12/11/2004")
      PureRESIZE_SetGadgetResize(#ListIcon_0, 1, 1, 1, 1)
    EndIf
  EndIf
EndProcedure
Open_Window_0()
; ListIcon Sort Setup
If PureLVSORT_SelectGadgetToSort(#ListIcon_0, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
  PureLVSORT_SetColumnType(#ListIcon_0, 0, #_PureLVSORT_String) ; default, not necessary
  PureLVSORT_SetColumnType(#ListIcon_0, 1, #_PureLVSORT_Numeric)
  PureLVSORT_SetColumnType(#ListIcon_0, 2, #_PureLVSORT_Float)
  PureLVSORT_SetColumnType(#ListIcon_0, 3, #_PureLVSORT_DateDDMMYYYY)
  PureLVSORT_SetColumnType(#ListIcon_0, 4, #_PureLVSORT_DateMMDDYYYY)
  PureLVSORT_SetLastColumnAutoResize(#ListIcon_0, #True)
EndIf


; WM_LBUTTONDBLCLK 
; fwKeys = wParam;        // key flags
; xPos = LOWORD(lParam);  // horizontal position of cursor
; yPos = HIWORD(lParam);  // vertical position of cursor
PureLVSORT_MakeColumnEditable(#ListIcon_0, 0, #True)
PostMessage_(GadgetID(#ListIcon_0), #WM_LBUTTONDBLCLK, 0, 12 | (42 <<16)) ;<---- double click on x = 12 y = 42 (mouse coordinates)

;
Repeat
  Event = WaitWindowEvent()
  Select Event
    Case #PB_Event_Gadget
  EndSelect
Until Event = #PB_Event_CloseWindow
End

_________________
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 439 posts ]  Go to page Previous  1 ... 25, 26, 27, 28, 29, 30  Next

All times are UTC + 1 hour


Who is online

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