egrid 4 grid gadget - (static PB library version.)

Developed or developing a new product in PureBasic? Tell the world about it.
rw
User
User
Posts: 27
Joined: Mon Sep 04, 2006 9:55 pm

Post by rw »

Hm, found it!

I had a "While WindowEvent(): Wend" in my sub which fills
the grid. With the new version this seems to behave differently.

One thing:

See your egrid example 2. If you drag the colums, the background color
changes. I think the color depends on the color of the column header.

This looks a little bit "strange" for me :-).

I think there must alway be the same background color (perhaps it should be
defined by the programer?),

By

rw
magicjo
User
User
Posts: 61
Joined: Sun May 07, 2006 10:43 am
Location: Italy

Post by magicjo »

@srod, is happened another thing using PureLVSort ,scenario: the egrid has the flag egrid_alwaysshowselection , so let the edit show on a cell, look at the text in that moment on the edit, order that column and you'll see that the text in edit overwrite all cells that are showed on that row.

Regards, magicjo
PB Registered User, Egrid Registered User
Win7 x64 Ultimate, 4,00 Gb Mem, Ati Radeon HD4600 Series, Realtek High Definition Audio Integrated
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

magicjo wrote:@srod, is happened another thing using PureLVSort ,scenario: the egrid has the flag egrid_alwaysshowselection , so let the edit show on a cell, look at the text in that moment on the edit, order that column and you'll see that the text in edit overwrite all cells that are showed on that row.

Regards, magicjo
You absolutely must remove the selection box before attempting a sort. I will not go into the reasons why, but it shouldn't be too much of a hassle. Actually there is indeed a problem here because PURELVSort will receive a notification that you have clicked a header before egrid does which makes removing the selection box somewhat problematic! It's the same reason that I must remove the selection box when you add a row etc. even with the #egrid_AlwaysShowSelection flag set. The alternative was way too messy!

I will be looking into PURELVSort later today so fingers crossed!

@rw: I could strangle you! :) The egrid library is in pieces at the moment whilst I was searching for the reason why the code may have slowed down! There is indeed a slowing down when adding rows but this was to avoid a gridline problem.
This is going to take me some time to put the lib back together!

Doh!

As for the background colour, it's an xor of the colours already present. This was the easiest way around the fact that with a custom header, Windows draws no part of the header at all. I kinda like it! :)

Actually, after a little experimenting; I agree with you! Consider this changed! 8)
I may look like a mule, but I'm not a complete ass.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Just released a new PureLVSORT for PB4.00 version.

We will try to make PureLVSORT and eGrid (almost) totally compatible.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Thanks Gnozal.

**UPDATE: 16th October 2006.

Both myself and Gnozal have made ammendments to our libraries (egrid + PURELVSort) with the purpose of getting our libs to work together. Initial tests are very positive.

I have therefore uploaded a new version of egrid which appears to run okay alongside PURELVSort.

Note, however, that before using PURELVSort on an egrid, you must first ensure that the selection box is removed (else chaos will ensue! :) ). If allowing the sort by column click, then set up a CellCallback function and trap the #egrid_HeaderItemClick message. From here issue the command egrid_HideEdit() etc. Also, bear in mind that what egrid regards as column 0, Purebasic, Windows and PURELVSort regard as column 1 so take care with this.

I will add this to the tricks and tips section of the help manual as and when we can confirm that there are no problems etc.

Also, and I haven't really had much time to test this, if using a custom egrid header, then the PURELVSort column icons will not (should not!) appear. Indeed, it is this area which I'm not sure about at the moment as the two libraries could embark on a fight to the death here! :)

I'll be very grateful to those users who are able to test this out. 8)

http://www.purecoder.net/egrid.htm
I may look like a mule, but I'm not a complete ass.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

@jackfrosty; I have added a CellCallback message to trap the user changing a selection in one of the combo box type cells as you requested. The message constant is #egrid_ComboBoxSelChanged.

I'll detail the change in the help manual and will include it all in the next update.
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

can you add usefull constants for egrid_CreateGrid() to the helpfile

would be nice

thx
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

ts-soft wrote:can you add usefull constants for egrid_CreateGrid() to the helpfile

would be nice

thx
Thomas
The help manual is massively incomplete, but the next command to be added is indeed the egrid_CreateGrid() command. In the meantime you'll find all the constants in the egrid residents source file.
I may look like a mule, but I'm not a complete ass.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

srod wrote:I'll be very grateful to those users who are able to test this out.
I've just quickly tried it with an updated version of the 'egrid4 demo 2' (inserting some random text for firstname, and numbers for the percentage bar) and looks like it works well. Thanks alot - this capability will be useful & supercedes my earlier question about confirming the 'best approach for sorting'). I'm asking gnozal on his PureLVSort posting if he's planning to update his lib for unicode, then it would be complete!
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Yes, I had a good bash at sorting with demo 2 (the most likely demo to give a problem) and could find no problems. Of course the PURELVSort icons will not appear with such examples because we are custom drawing the header in these cases.

If no errors are reported today then I'll add a section to the help manual on sorting.

:)
I may look like a mule, but I'm not a complete ass.
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

srod wrote:Of course the PURELVSort icons will not appear with such examples because we are custom drawing the header in these cases
Yeah, I personally don't feel that's a major problem - after sorting it's only going to be in one of two states (asc or dec order), and looking at the content it should be obvious which state it's in especially since the user just clicked the header! :)
jacfrosty
User
User
Posts: 21
Joined: Mon May 23, 2005 3:05 pm
Location: England, UK

Post by jacfrosty »

Thanks for adding that new callback message so quickly, I will give it ago later on.

Much appreciated.

Regards

jacfrosty
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

jacfrosty wrote:Thanks for adding that new callback message so quickly, I will give it ago later on.

Much appreciated.

Regards

jacfrosty
I haven't uploaded this version yet. Later today. :)
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 »

Hi srod!

Congratulations to your eGrid ! Seems to be very good!
I was recommended to use your eGrid, because I want to put a ProgressbarGadget() into a ListIcongadget().

But when I visited your website, I discovered, that eGrid is not free.
Did I understand it right?
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:Hi srod!

Congratulations to your eGrid ! Seems to be very good!
I was recommended to use your eGrid, because I want to put a ProgressbarGadget() into a ListIcongadget().

But when I visited your website, I discovered, that eGrid is not free.
Did I understand it right?
Yes that's right.

This is the only thing released to this community which I've asked for some kind of recompense for. I have explained my reasons for doing so somewhere in this thread (probably page 1), but, in a nutshell; I am now working for myself, i.e. self-employed and whilst I did not ever intend to make egrid a commercial product, it has taken over a year to progress it this far and it is now consuming a lot of my time simply to keep abreast of all the requests and updates etc.

The price of £7-50 is some considerable way below that which I will charge for non-Purebasic users (when I convert the library to a dll) and, if you look around at other commercial grids, you'll see just how much cheaper it is!

As I say, I don't really feel comfortable charging this community, but the alternative is that I would be forced to let this project die. Also, there are several free -and open source- grid controls floating around and so mine is not the only choice. At the end of the day, egrid will live or die depending upon its worth to those who would make use of it etc.

Of course, if someone such as a cash-strapped student ( :) ) desperately needed egrid for a non-commercial project, then I'd probably relent (with the promise that once the said student had got a job selling oil rigs and such like, they'd remember my generosity!) :wink:

Hope this helps.
I may look like a mule, but I'm not a complete ass.
Post Reply