PureLVSORT library : sorting ListIconGadgets (and more)

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Changes :
- improved PureLVSORT_SetLastColumnAutoResize() again ...
- PB4.0x only : in the archive you will find the standard version and a plus version. The plus version adds some basic listicon editing functions (needs some testing).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Thanks, I'll test it.

> The example in the help is wrong
I would like to see "31/12/2004 11:20" (with %yyyy). Can you add this?


> The plus version adds some basic listicon editing functions (needs some testing).
Sorry, I don't understand. Can you explain this to me, please?
PB 4.30

Code: Select all

onErrorGoto(?Fred)
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

AND51 wrote:> The plus version adds some basic listicon editing functions (needs some testing).
Sorry, I don't understand. Can you explain this to me, please?
Have a look at the PureLVSORT_MakeColumnEditable() command in the help manual.

Pretty neat Gnozal. Love the spin gadget; that's a mighty fine idea! 8)
I may look like a mule, but I'm not a complete ass.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Bug found!

Oh my god, gnozal, you made the current version (I've just installed it) very, very buggy... :cry:

I know, it's annoying, but I need to finish my project ASAP. So, please fix this bug OR send me a link to the older version, ok?

Here's a screenshot:

ImageThe scrollbar is NOT visible any more (just a very little bit, it's clipped).

You can only scroll <---horizontal---> by clicking the gadget and presing RIGHT CURSOR.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AND51 wrote:Bug found!
Oh my god, gnozal, you made the current version (I've just installed it) very, very buggy... :cry:
Such dramatic statements do not help
AND51 wrote:So, please fix this bug OR send me a link to the older version, ok?
I do not keep trace of all versions. If the problem occurs only with PureLVSORT_SetLastColumnAutoResize() you can avoid the problem by not using this function.
AND51 wrote:Here's a screenshot:
Some code that demonstrate the problem helps much more than some screenshot or movie, because I can't reproduce your problem.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

I have updated the library again.

2AND51 : It may not fix your problem, as I can't reproduce it. If so simply don't use PureLVSORT_SetLastColumnAutoResize() .
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Hello gnozal!

The code is still the same, as the last one, I sent you.
But you don't have to read the old PM again. If I am at home, I will send you the code again.

I didn't edit the code - just updated the lib => problem occurs. I use less libs as possible, the onliest libs I've got installed is PureLVSORT and PureRESIZE.

So, either this problem (screenshot) was caused by my coding (which is abviously not the case) or by your lib.


> It may not fix your problem, as I can't reproduce it. If so simply don't use PureLVSORT_SetLastColumnAutoResize()
I know that don't using this function overcomes the problem. But I want to make the program as comfortable as possible for my users. And if you offer this command, why shouldn't I use it?
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AND51 wrote:The code is still the same, as the last one, I sent you.
But you don't have to read the old PM again. If I am at home, I will send you the code again.
If you mean this code

Code: Select all

   ListIconGadget(#listicon, 10, 195, 580, 245, "PROGRAM", 125, #PB_ListIcon_MultiSelect|#PB_ListIcon_AlwaysShowSelection|#PB_ListIcon_FullRowSelect|#PB_ListIcon_HeaderDragDrop) 
      AddGadgetColumn(#listicon, 1, "USES", 75) 
      AddGadgetColumn(#listicon, 2, "Zuletzt geändert", 125) 
      AddGadgetColumn(#listicon, #gadgetdata, "Interne ID", 0) 
      AddGadgetColumn(#listicon, 4, "{ Kommentar }", 225) 
      PureLVSORT_SelectGadgetToSort(#listicon, #PureLVSORT_ShowClickedHeader_IconRight) 
         PureLVSORT_SetColumnType(#listicon, 2, #PureLVSORT_DateDDMMYYHHMM) 
         PureLVSORT_SetLastColumnAutoResize(#listicon, #True) 
         PureLVSORT_SetColumnAlignment(#listicon, 1, #PureLVSORT_Center) 
         PureLVSORT_SetColumnAlignment(#listicon, 2, #PureLVSORT_Center) 
         PureLVSORT_SetColumnFlag(#listicon, 2, #PureLVSORT_Column_Fixed) 
         PureLVSORT_SetColumnFlag(#listicon, #gadgetdata, #PureLVSORT_Column_Fixed) 
         PureLVSORT_SetColumnFlag(#listicon, #gadgetdata, #PureLVSORT_Column_Hidden)
I can't reproduce the problem with that code. When does it occur ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Still not enough time to post my coe, but I want to give a quick response:
> I can't reproduce the problem with that code. When does it occur ?
At program startup, I scan a directory recursively, listing some file in the ListIcon. Directly before ProcedureReturn I let the gadget being sorted manually (PureLVSORT_SortGadget()).

I'll send you the code ASAP (now I must go to school).
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AND51 wrote:Still not enough time to post my coe, but I want to give a quick response:
> I can't reproduce the problem with that code. When does it occur ?
At program startup, I scan a directory recursively, listing some file in the ListIcon. Directly before ProcedureReturn I let the gadget being sorted manually (PureLVSORT_SortGadget()).

I'll send you the code ASAP (now I must go to school).
Maybe setting PureLVSORT_SetLastColumnAutoResize(#listicon, #True) AFTER you have filled the listicon could help ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

> Maybe setting PureLVSORT_SetLastColumnAutoResize(#listicon, #True) AFTER you have filled the listicon could help ?
But it can be that the ListIcongadget must be refilled then I had to switch this on and off all the time...

I'll send you a PM now, containing the wohll program as EXE and PB...
It scans a folder for TuorboPascal-files (*.pas). So if you want to see an effect, you must have those files (I don't believe this) or you must fill the list with own entries.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AND51 wrote:> Maybe setting PureLVSORT_SetLastColumnAutoResize(#listicon, #True) AFTER you have filled the listicon could help ?
But it can be that the ListIcongadget must be refilled then I had to switch this on and off all the time...
If you refill 'all the time' you can also switch on/off 'all the time' if it helps (2 lines of code !).
Well, does it help ?
AND51 wrote:I'll send you a PM now, containing the wohll program as EXE and PB...
It scans a folder for TuorboPascal-files (*.pas). So if you want to see an effect, you must have those files (I don't believe this) or you must fill the list with own entries.
I was more thinking of a short informative and executable code snippet

EDIT: you code is not executable, lots of missing stuff.
I tried to simulate the 'refill' stuff with lots of AddGadgetItem() in a loop : I do not get any trouble.
Btw, when you fill a listicon you may want to add some #WM_SETREDRAW off and on to speed up your procedure.

Code: Select all

  SendMessage_(hListIcon, #WM_SETREDRAW, #False, 0)
  IFillMyListIcon()
  SendMessage_(hListIcon, #WM_SETREDRAW, #True, 0)
Last edited by gnozal on Thu May 03, 2007 4:05 pm, edited 1 time in total.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Oh, then I misunderstood you.

Yes, the function SetLastColumnsAutoResize is definetely buggy, somehow.

I deactiveated it, and now it works, I can scroll in every directions if neccessary. I don't know, what is going on, if i activate it afterwards... let's see...

You're right, it are only 2 lines of code.
I'm now gping to improve the program regarding the ListIcon.

I'm sorry, I've got now snippet... :(
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update

Special version for PB4.10 : http://freenet-homepage.de/gnozal/PureLVSORT__.zip
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post by byo »

gnozal wrote:Update

Special version for PB4.10 : http://freenet-homepage.de/gnozal/PureLVSORT__.zip

Hmm... Will every lib made for 4.02 have to be changed for PB 4.10?


Nice work, btw.
Post Reply