It is currently Wed May 22, 2013 12:48 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 429 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 29  Next
Author Message
 Post subject:
PostPosted: Wed Aug 24, 2005 7:51 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Flype wrote:
hello gnozal,
i like the #PureLVSORT_DateDDMMYYYY flag.
i use it very very often but i need a little bit more powerful flag.
in fact, i need to display in a column a datetime like this :
DD/MM/YYYY HH:MM:SS or DD.MM.YY HH:MM
So is it possible to add DATETIME and TIME sorting ?
regards.

Ok, for next version.

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 24, 2005 9:39 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update

New column types :
- #PureLVSORT_DateDDMMYYYYHHMMSS ; example : "31/12/2003 12:31:21"
- #PureLVSORT_DateDDMMYYHHMM ; example : "31/12/2003 12:31"

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 24, 2005 8:50 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
a man on whom whe can rely on.
thank you very much :twisted:

[EDIT]
but i think you forget a very little small thing but important one : the update doesn't include the new constante file...

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 24, 2005 11:06 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 07, 2004 8:47 am
Posts: 1855
Location: Argentina
I'll check it out at home undoubtly!
This will be useful for many developers around.

_________________
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 25, 2005 9:55 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Flype wrote:
i think you forget a very little small thing but important
one : the update doesn't include the new constante file...

Are you sure ?
I have just downloaded it and the PureLVSORT.res file has the 2 new constants (PureLVSORT.res 746 bytes 24/08/2005 09:39)

Code:
ERUP    3SERTCRS    TSNCΠ PureLVSORT_AutoSize  ÿÿÿÿPureLVSORT_Center     PureLVSORT_DateDDMMYYHHMM        PureLVSORT_DateDDMMYYYY     PureLVSORT_DateDDMMYYYYHHMMSS     PureLVSORT_DateMMDDYYYY     PureLVSORT_FileSize     PureLVSORT_Float     PureLVSORT_Left      PureLVSORT_MemoryAllocationProblem     PureLVSORT_NoSorting     PureLVSORT_NotAGadget     PureLVSORT_Numeric     PureLVSORT_Ok     PureLVSORT_Right     PureLVSORT_ShowClickedHeader_Icon     PureLVSORT_ShowClickedHeader_IconLeft     PureLVSORT_ShowClickedHeader_IconRight     PureLVSORT_ShowClickedHeader_No      PureLVSORT_ShowClickedHeader_Text     PureLVSORT_String      PureLVSORT_String_CaseSensitive     PureLVSORT_UndefinedGadget     PureLVSORT_UseHeader  þÿÿÿ

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 25, 2005 3:01 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
i have re-downloaded the file and now it's ok - you're right.
i don't understand but nevermind. and thanx again.
:wink:

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 15, 2005 4:51 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Feb 24, 2004 3:43 am
Posts: 540
Location: Israel
Is there a way in the commands to sort it on the fly as i wish? like a timer?

like that if i have a listicon that changes all the time and each 5 min i want to sort it, is it possible to send a command for it to be sorted?

thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 16, 2005 7:48 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Pantcho!! wrote:
is it possible to send a command for it to be sorted?
Yes, you can use the PureLVSORT_SortListIconNow() function to sort a listicon when you want (without a user click on a column header).

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


Top
 Profile  
 
 Post subject: accent
PostPosted: Sat Sep 17, 2005 12:25 pm 
Offline
New User
New User

Joined: Wed Jun 01, 2005 2:50 pm
Posts: 1
Hi Gnozal!

It's a really great library!

But it would be really important for other languages to create a function
where I can redefine the alphabetic order.

If I sort in hungarian ascending.

a, b .... z, a', e' ...

In my ascii table z is 122 and a' is 225, maybe this is the reason why.

If I should be redefine the alphabet with a function!

Every non-english user would thank you for this feature!

Bye, Aruna


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 20, 2005 12:17 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
halinux wrote:
In my ascii table z is 122 and a' is 225, maybe this is the reason why.
Yes, the sorting is done according to ASCII/ANSI code.
halinux wrote:
If I should be redefine the alphabet with a function!
Every non-english user would thank you for this feature!
I am also a non-english user (I am french) :wink:
I will see what I can do for the next version.

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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 24, 2005 11:36 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Library update

Changes :
- new function PureLVSORT_DefineAlphabeticOrder() for defining the sorting order for the 256 ASCII codes
- new flag for PureLVSORT_SetColumnType() : #PureLVSORT_Alphabetic_User

Code:
Procedure.l WindowCallBack(WindowId.l, message.l, wParam.l, lParam.l)
  ReturnValue.l = #PB_ProcessPureBasicEvents
  ;
  ReturnValue = PureLVSORT_CallBack(WindowId, message, wParam, lParam, ReturnValue)
  ;
  ProcedureReturn ReturnValue
EndProcedure
;
#Window_0 = 0
#ListIcon_0 = 0
Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 0, 602, 302,  #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered , "PureLVSORT User Array Test")
    If CreateGadgetList(WindowID())
      ListIconGadget(#ListIcon_0, 5, 5, 590, 285, "User", 110)
      AddGadgetColumn(#ListIcon_0, 1, "DateDDMMYYYYHHMMSS", 130)
      AddGadgetColumn(#ListIcon_0, 2, "DateDDMMYYHHMM", 130)
      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, "éseza" + Chr(10) + "12/05/2001 06:41:30" + Chr(10) + "19/07/66 06:41" + Chr(10) + "31/12/2004" + Chr(10) + "12/31/2004" + Chr(10) + "15.02 MB" + Chr(10) + "0")
      AddGadgetItem(#ListIcon_0, -1, "zssdd" + Chr(10) + "05/07/2004 09:21:30" + Chr(10) + "12/05/01 07:50" + Chr(10) + "11/12/2004" + Chr(10) + "12/11/2004"  + Chr(10) + "65 B" + Chr(10) + "1")
      AddGadgetItem(#ListIcon_0, -1, "tdeed" + Chr(10) + "19/11/2003 07:18:31" + Chr(10) + "13/08/03 06:41" + Chr(10) + "21/01/2003" + Chr(10) + "01/21/2003" + Chr(10) + "5.98 GB" + Chr(10) + "3")
      AddGadgetItem(#ListIcon_0, -1, "ùdsdd" + Chr(10) + "19/11/2003 06:21:30" + Chr(10) + "12/05/01 06:41" + Chr(10) + "10/06/2001" + Chr(10) + "06/10/2001" + Chr(10) + "100 KB" + Chr(10) + "A")
      AddGadgetItem(#ListIcon_0, -1, "cdgdd" + Chr(10) + "19/11/2003 16:21:30" + Chr(10) + "12/05/01 06:41" + Chr(10) + "10/08/2001" + Chr(10) + "16/11/2001" + Chr(10) + "800 KB" + Chr(10) + "9")
      AddGadgetItem(#ListIcon_0, -1, "âdsdg" + Chr(10) + "19/11/2003 06:21:31" + Chr(10) + "12/05/01 06:41" + Chr(10) + "10/06/2004" + Chr(10) + "06/10/2004" + Chr(10) + "101 KB" + Chr(10) + "z")
      AddGadgetItem(#ListIcon_0, -1, "fdsdd" + Chr(10) + "19/11/2003 06:21:30" + Chr(10) + "12/05/01 06:41" + Chr(10) + "10/04/2001" + Chr(10) + "07/08/2004" + Chr(10) + "1000 B" + Chr(10) + "A")
    EndIf
  EndIf
EndProcedure
Open_Window_0()
SetWindowCallback(@WindowCallBack())
; define alphabetic order user array
Structure Array256
  Byte.b[256]
EndStructure
UserArray.Array256
; standard ASCII values
For i = 0 To 255
  UserArray\Byte[i] = i
Next
; change some values
UserArray\Byte[Asc("à")] = 'a'
UserArray\Byte[Asc("â")] = 'a'
UserArray\Byte[Asc("ù")] = 'u'
UserArray\Byte[Asc("û")] = 'u'
UserArray\Byte[Asc("ü")] = 'u'
UserArray\Byte[Asc("é")] = 'e'
UserArray\Byte[Asc("è")] = 'e'
UserArray\Byte[Asc("ê")] = 'e'
; declare user array (before using #PureLVSORT_Alphabetic_User !)
PureLVSORT_DefineAlphabeticOrder(@UserArray)
; ListIcon Sort Setup
If PureLVSORT_SelectGadgetToSort(#ListIcon_0, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
  ;PureLVSORT_SetColumnType(#ListIcon_0, 0, #PureLVSORT_String)
  PureLVSORT_SetColumnType(#ListIcon_0, 0, #PureLVSORT_Alphabetic_User)
  PureLVSORT_SetColumnType(#ListIcon_0, 1, #PureLVSORT_DateDDMMYYYYHHMMSS)
  PureLVSORT_SetColumnType(#ListIcon_0, 2, #PureLVSORT_DateDDMMYYHHMM)
  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
;
Repeat
  Event = WaitWindowEvent()
Until Event = #PB_EventCloseWindow
End

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 12:38 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update

Changes
- new function PureLVSORT_GetClickedCellColumn() : Get the listicon clicked cell column after a click event.
- new function PureLVSORT_GetClickedCellRow() : Get the listicon clicked cell row after a click event.
Code:
Procedure.l WindowCallBack(WindowId.l, message.l, wParam.l, lParam.l)
  ReturnValue.l = #PB_ProcessPureBasicEvents
  ;
  ReturnValue = PureLVSORT_CallBack(WindowId, message, wParam, lParam, ReturnValue)
  ;
  ProcedureReturn ReturnValue
EndProcedure
; Create Window
OpenWindow(0, 100, 300, 420, 170, #PB_Window_SystemMenu, "PureLVSORT test : get clicked cells coordinates")
If CreateGadgetList(WindowID())
  ListIconGadget(1, 1, 1, 250, 160, "0", 50, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
  AddGadgetColumn(1, 1, "1", 50)
  AddGadgetColumn(1, 2, "2", 50)
  AddGadgetColumn(1, 3, "3", 50)
  AddGadgetColumn(1, 4, "4", 50)
  AddGadgetColumn(1, 5, "5", 50)
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  AddGadgetItem(1, -1, " ")
  ListIconGadget(2, 260, 1, 150, 160, "0", 50, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
  AddGadgetColumn(2, 1, "1", 50)
  AddGadgetColumn(2, 2, "2", 50)
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
  AddGadgetItem(2, -1, " ")
EndIf
SetWindowCallback(@WindowCallBack())
Repeat
  EventID.l = WaitWindowEvent()
  GadgetID.l = EventGadgetID()
  EventType.l = EventType()
  If EventID = #PB_EventGadget
    If GadgetID = 1
      Debug "* ListIconGadget 1 Event"
      If EventType = #PB_EventType_LeftClick
        Debug " Left Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      ElseIf EventType = #PB_EventType_LeftDoubleClick
        Debug " Left DBL Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      ElseIf EventType = #PB_EventType_RightClick
        Debug " Right Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      ElseIf EventType = #PB_EventType_RightDoubleClick
        Debug " Right DBL Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      EndIf
    EndIf
    If GadgetID = 2
      Debug "* ListIconGadget 2 Event"
      If EventType = #PB_EventType_LeftClick
        Debug "Left Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      ElseIf EventType = #PB_EventType_LeftDoubleClick
        Debug " Left DBL Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      ElseIf EventType = #PB_EventType_RightClick
        Debug " Right Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      ElseIf EventType = #PB_EventType_RightDoubleClick
        Debug " Right DBL Click at ROW:" + Str(PureLVSORT_GetClickedCellRow()) + " COL:" + Str(PureLVSORT_GetClickedCellColumn())
      EndIf
    EndIf
  ElseIf EventID = #PB_EventCloseWindow
    Break
  EndIf
ForEver
;
End

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 24, 2005 3:38 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update

Changes
- new : PureLVSORT_CountColumns(GadgetNumber.l) : Count the columns in a ListIcon.
- new : PureLVSORT_SaveListIcon(GadgetNumber.l, FileName.s) : Save ListIcon content to a file (compressed with JCalG1 algorithm).
- new : PureLVSORT_LoadListIcon(GadgetNumber.l, FileName.s) : Load ListIcon content saved with PureLVSORT_SaveListIcon().

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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 12:16 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update

Changes
- new : PureLVSORT_ScrollToRow(GadgetNumber.l, Row.l) : Scroll the ListiconGadget to the given row (make it visible at the top of the list).
- new : PureLVSORT_DefineUserCallback(*UserCallbackAddress) : Define user sorting callback.

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 3:03 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
Update

No more Callback needed

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 429 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 29  Next

All times are UTC + 1 hour


Who is online

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