It is currently Thu May 23, 2013 5:35 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 429 posts ]  Go to page Previous  1 ... 24, 25, 26, 27, 28, 29  Next
Author Message
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Tue Dec 06, 2011 4:05 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Nov 06, 2005 6:07 am
Posts: 133
Location: Perth Western Australia
Hi Gnozal,

I have been playing with your PureLVSort agian, and I would like to know how I could use the Editing callback.

I have a listIcongadget that I would like to let the user select input from a list.
In your demo you use;

Procedure.l MyEditCallback(Event.l, ListIconNumber.l, Column.l, Row.l, text.s)
Debug "*** EDITING CALLBACK"
Select Event
Case #PureLVSORT_EditStart
Debug "ListIcon = " + Str(ListIconNumber)
Debug "Column = " + Str(Column)
Debug "Row = " + Str(Row)
Debug "-> Editing started"
;
; Return : - 0 to enable stringgadget
; - *string to enable spingadget [the string holds the choice items]
;
ProcedureReturn @"700|800|900|1000"
....

how do I replace the @"700|800|900|1000" with text from my input list.( read from a file and can change while the program runs)
I read the info on pointers but that did not get me far.

Thank
Leo

_________________
Regards
Leo


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Tue Dec 13, 2011 1:34 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
leodh wrote:
how do I replace the @"700|800|900|1000" with text from my input list.( read from a file and can change while the program runs)
You may replace the literal with a string variable.

Load your list from a file and store it in a (global or shared) variable, say MyList$.
In the callback, simply use ProcedureReturn @MyList$

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


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Dec 14, 2011 8:03 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jun 09, 2003 8:30 am
Posts: 158
a very little bug ?
PureLVSORT_SetFilterTimeOut(1) works
PureLVSORT_SetFilterTimeOut(0) doesn't work but takes default 1000 i guess

PB 4.6

_________________
사십 둘 .


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Dec 15, 2011 9:08 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
bobobo wrote:
a very little bug ?
PureLVSORT_SetFilterTimeOut(1) works
PureLVSORT_SetFilterTimeOut(0) doesn't work but takes default 1000 i guess
PB 4.6
PureLVSORT uses the HDM_SETFILTERCHANGETIMEOUT message.
Code:
SendMessage_(hHeader, #HDM_SETFILTERCHANGETIMEOUT, 0, PureLVSORT_FilterTimeOut)
I guess it's a windows issue ?

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


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Dec 16, 2011 5:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Jun 09, 2003 8:30 am
Posts: 158
maybe a little update in the help will do

thanks :D

_________________
사십 둘 .


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Sat Dec 24, 2011 6:35 am 
Offline
User
User

Joined: Mon Aug 01, 2011 6:16 pm
Posts: 37
Hi gnozal...

how set a filter for text??

I use PureLVSORT_SetFilter(#MyListIcon), but only filter numbers, how i do for text??

ex: i want filter for "purebasic" but not filter only i can filter numeric.

can you help me??


thanks??


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Sat Dec 24, 2011 8:55 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
moob wrote:
I use PureLVSORT_SetFilter(#MyListIcon), but only filter numbers, how i do for text??
ex: i want filter for "purebasic" but not filter only i can filter numeric.
I don't understand your question.
The filterbar works with any kind of text, numbers or not.

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


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Sat Dec 24, 2011 3:45 pm 
Offline
User
User

Joined: Mon Aug 01, 2011 6:16 pm
Posts: 37
gnozal wrote:
moob wrote:
I use PureLVSORT_SetFilter(#MyListIcon), but only filter numbers, how i do for text??
ex: i want filter for "purebasic" but not filter only i can filter numeric.
I don't understand your question.
The filterbar works with any kind of text, numbers or not.


I have list ListIcon with 8940 lines, when i put in filter any text don't filter.

here is may config.

Code:
      ListIconGadget(#ListIcon_41, 15, 38, 241, 492, "Index", 50, #PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect)
      AddGadgetColumn(#ListIcon_41, 1, "ID", 65)
      AddGadgetColumn(#ListIcon_41, 2, "Name", 100)
      SendMessage_(GadgetID(#ListIcon_41), #LVM_SETCOLUMNWIDTH, 2, #LVSCW_AUTOSIZE_USEHEADER)
      If PureLVSORT_SelectGadgetToSort(#ListIcon_41, #PureLVSORT_ShowClickedHeader_IconLeft) = #PureLVSORT_Ok
        PureLVSORT_SetColumnType(#ListIcon_41, 0, #PureLVSORT_Numeric)
        PureLVSORT_SetColumnType(#ListIcon_41, 1, #PureLVSORT_Numeric)
        PureLVSORT_SetColumnType(#ListIcon_41, 2, #PureLVSORT_Alphabetic_User)
        PureLVSORT_SortListIconNow(#ListIcon_41, 1, -1)
        PureLVSORT_SetFilter(#ListIcon_41)
      EndIf


Image


Last edited by moob on Wed Dec 28, 2011 2:02 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Dec 28, 2011 11:48 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
moob wrote:
gnozal wrote:
moob wrote:
I use PureLVSORT_SetFilter(#MyListIcon), but only filter numbers, how i do for text??
ex: i want filter for "purebasic" but not filter only i can filter numeric.
I don't understand your question.
The filterbar works with any kind of text, numbers or not.


I have list ListIcon with 8940 lines, when i put in filter any text don't filter.
Hard to say without the complete sources or a code snippet that demonstrates the issue.
Do you use a virtual listicon ?

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


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Dec 28, 2011 2:03 pm 
Offline
User
User

Joined: Mon Aug 01, 2011 6:16 pm
Posts: 37
gnozal wrote:
moob wrote:
gnozal wrote:
moob wrote:
I use PureLVSORT_SetFilter(#MyListIcon), but only filter numbers, how i do for text??
ex: i want filter for "purebasic" but not filter only i can filter numeric.
I don't understand your question.
The filterbar works with any kind of text, numbers or not.


I have list ListIcon with 8940 lines, when i put in filter any text don't filter.
Hard to say without the complete sources or a code snippet that demonstrates the issue.
Do you use a virtual listicon ?


No i don't.


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Dec 29, 2011 2:51 am 
Offline
New User
New User

Joined: Sun Oct 31, 2010 2:12 am
Posts: 4
Oops... I guess I originally posted this in the wrong place. Sorry 'bout that folks. Didn't mean to clutter things up on the root.

Anyway, here is my original post:

I am currently using PureBASIC 4.51 with the matching PureCOLOR and PureLVSORT libraries on a particular project. (I could upgrade the project to 4.60. I don't think it would cause any problems, I just haven't done it yet.)

I was wondering if there is an easy way to change the color of the filter selection bar when performing an automatic filter search as the user types in the filter header. (And I'm not talking about the normal "clicked on a row" selection bar.) Right now the selection bar is showing up as a barely visible light gray. I currently have the mechanism in place to allow the user to change the text color along with the two alternate colors for the ListView gadget, but I can't see a way to change the filter selection bar. Is this accessible via a Windows API call, or am I missing something obvious in the PureLVSORT or PureCOLOR libraries?

I'm not sure if this would be more related to PureLVSORT or PureCOLOR, so I stuck it here.

Thank you.

Eric


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Dec 29, 2011 8:57 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
elevy wrote:
I was wondering if there is an easy way to change the color of the filter selection bar when performing an automatic filter search as the user types in the filter header. (
Hi Eric,
sorry there isn't.
PureCOLOR_SetGadgetColorEx() with #PureCOLOR_LTV_SelectedItem flag does not support the filterbar.

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


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Fri Jan 20, 2012 9:13 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Jul 14, 2006 8:53 pm
Posts: 589
Location: Malta
Hi,

I am trying to add PureLVSORT_SelectGadgetToSort() to my program but when i compile I get and error "_PB_StringBasePosition"
I am using non-unicode, threadsafe

If I do not install the "plus" version, without .res I assume..i do not get the error, but then the constants are not defined

Can you please help?
Thanks

EDIT

Forgot about the UserLibThreadSafe

_________________
Brazil, wait for me, here I come...

http://www.en3.biz


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Wed Apr 11, 2012 1:22 pm 
Offline
New User
New User

Joined: Thu Feb 17, 2011 11:08 pm
Posts: 5
Hi
- is it possible to make the filter field - drop-down list?
- Can you help me create callback to sort on two columns at the same time
Image

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)
    EndIf
  EndIf
EndProcedure
;
#Window_0 = 0
#ListIcon_0 = 0
;
Procedure Open_Window_0()
  If OpenWindow(#Window_0, 216, 0, 602, 302, "PureLVSORT Test",  #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered)
    If CreateGadgetList(WindowID(#Window_0))
      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)
      AddGadgetItem(#ListIcon_0, -1, "ABCDE" + Chr(10) + "514" + Chr(10) + "0.9" + Chr(10) + "31/12/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")
      AddGadgetItem(#ListIcon_0, -1, "ZABCD" + Chr(10) + "-414" + Chr(10) + "7.0" + Chr(10) + "21/01/2003" + Chr(10) + "01/21/2003")
      AddGadgetItem(#ListIcon_0, -1, "DEFGH" + Chr(10) + "524" + Chr(10) + "900" + Chr(10) + "10/06/2001" + Chr(10) + "06/10/2001")
      AddGadgetItem(#ListIcon_0, -1, "AFFGH" + Chr(10) + "352" + Chr(10) + "911" + Chr(10) + "10/06/2004" + Chr(10) + "06/10/2003")
      AddGadgetItem(#ListIcon_0, -1, "ZSFZI" + Chr(10) + "574" + Chr(10) + "921" + Chr(10) + "10/06/2002" + Chr(10) + "06/10/2004")
      AddGadgetItem(#ListIcon_0, -1, "ZEKZH" + Chr(10) + "521" + Chr(10) + "931" + Chr(10) + "10/06/2011" + Chr(10) + "06/10/2005")
      AddGadgetItem(#ListIcon_0, -1, "ZFFGH" + Chr(10) + "523" + Chr(10) + "913" + Chr(10) + "10/06/2011" + Chr(10) + "06/10/2001")
      AddGadgetItem(#ListIcon_0, -1, "AZFHI" + Chr(10) + "522" + Chr(10) + "923" + Chr(10) + "10/06/2006" + Chr(10) + "06/10/2001")
      AddGadgetItem(#ListIcon_0, -1, "AEZGH" + Chr(10) + "529" + Chr(10) + "933" + Chr(10) + "10/06/2000" + Chr(10) + "06/11/2001")
      AddGadgetItem(#ListIcon_0, -1, "DZFKH" + Chr(10) + "624" + Chr(10) + "900" + Chr(10) + "10/07/2001" + Chr(10) + "06/11/2001")
      AddGadgetItem(#ListIcon_0, -1, "DEFGI" + Chr(10) + "625" + Chr(10) + "900" + Chr(10) + "10/08/2001" + Chr(10) + "06/11/2001")
      AddGadgetItem(#ListIcon_0, -1, "DSFKH" + Chr(10) + "623" + Chr(10) + "900" + Chr(10) + "10/09/2001" + Chr(10) + "06/11/2001")
    EndIf
  EndIf
EndProcedure
;
Open_Window_0()
;
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_SortListIconNow(#ListIcon_0, 3, 1)
  *ListBuffer = PureLVSORT_SaveListIconToMem(#ListIcon_0)
  PureLVSORT_DefineFilterCallback(@MyFilterCallback())
  PureLVSORT_SetFilterTimeOut(100)
  PureLVSORT_SetFilter(#ListIcon_0)
EndIf
;
Repeat
  Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
If *ListBuffer
  FreeMemory(*ListBuffer)
EndIf
End


Top
 Profile  
 
 Post subject: Re: PureLVSORT library : sorting ListIconGadgets (and more)
PostPosted: Thu Apr 12, 2012 8:41 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat Apr 26, 2003 8:27 am
Posts: 4231
Location: Strasbourg / France
kosjachok wrote:
- is it possible to make the filter field - drop-down list?
No.
kosjachok wrote:
- Can you help me create callback to sort on two columns at the same time
PureLVSORT uses the Windows API #LVM_SORTITEMS message, so this is not possible, but there are some code examples on this forum iirc.

_________________
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 ... 24, 25, 26, 27, 28, 29  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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