Custom grid-control (egrid 2.0) - Updated.

Developed or developing a new product in PureBasic? Tell the world about it.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Dare2 wrote:What is your position on having this used in a closed-source and commercial app?

Specifically: I would like to use this instead of a listicongadget approach I am currently using in a "creation" wizard associated with an app that will be sold next year. Do I have your permission to do so?

Thanks again. :)
Absolutely. By all means go ahead. I don't see the point in releasing the code if I were then to restrict its use. But I appreciate your taking the time to seek clarification etc. A mention in the credits is all I ask!

btw: I'm still to fix the Win 98 SE problem discussed above. I know what the problem is and how to solve it, but am seeking a more sophisticated solution than the one I currently have. Should have it done within a day or so.
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 »

FIXED: the problem with Win 98 SE discussed above. Problem seems to be due to the way Win 98 releases the memory when freeing controls etc.

Unfortunately, you can no longer use the normal Purebasic command

Code: Select all

FreeGadget()
when freeing an egrid from code.

Instead, use the command

Code: Select all

egrid_FreeGadget()
(See user guide.)

My thanks to TerryHough for testing my various attempts at fixing this swine of a problem!
I may look like a mule, but I'm not a complete ass.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Thanks srod. :)
@}--`--,-- A rose by any other name ..
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

**Bug fixed.

A rather obscure bug was reported when selecting cells from code through a CellCallback function. It shouldn't affect many applications, but I've uploaded a new version anyhow.
I may look like a mule, but I'm not a complete ass.
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

Great gadget :D

Will you be adding sorting to your grid control ?

I've tried to use the PureLVSORT library but it's not working!

I'm trying to work it out, but it's proving difficult :lol:
Paid up PB User !
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I wasn't planning on adding any sorting capabilities as such.

Can't comment as to why the PureLVsort library doesn't work. Could be a clash with all the subclassing going on. In an egrid, both the underlying listicon and the header control are subclassed separately. This could be the cause of any problems as the PureLVSort library undoubtedly adds it's own layer of subclassing.
I may look like a mule, but I'm not a complete ass.
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

Thanks, I got it working anyway :)

All I had to do was to enable header clicking in egrid.pb

Line 1544 in egrid_CreateGrid()

g=ListIconGadget(gadgetnum, 0, 0, width, height, "", 1, styleflags) ;|#LVS_NOSORTHEADER) Commented out!

Maybe this could be an option in the library when creating the grid for people who might want to also use PureLVSORT or any other header clicking code !

Great gadget !!!
Paid up PB User !
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I'd forgotten about that! :D

I'll bear this in mind when I get round to updating the code for PB4. Nice job.
I may look like a mule, but I'm not a complete ass.
Post Reply