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

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

srod wrote:If I go down that path then I probably will make use of your installer.
I will do some changes to support a installation of a libary.
(e.g. disable installer / no program directory needed)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
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 »

>> no program directory needed
somebody have 2 or more PB installations. A pathrequester is required.
Only init on the pb-directory is usefull
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
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

I meen "...\PureBasic\Egrid\". You can install it as subdirectories direct in "...\PureBasic\" with "%Purebasic%". The pathrequester contains the current PureBasic path and you can change it if needed.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I was having a look at your setup creator Thorsten; it looks excellent.

For installings libs; will it happily place individual files in the various Purebasic subfolders; subsystems and the like?
I may look like a mule, but I'm not a complete ass.
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

I've still tried it and it works. You must copy all files and subdirectories in a source directory (like in the ZIP). The problem is the uninstaller, which will be copied by default in the PureBasic folder. So I will include a new option to remove the uninstaller from the setup file.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Got you. That makes sense.

:)

Thanks.
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 again, hi srod,

thank you for your reply, it helped me. :)
PB 4.30

Code: Select all

onErrorGoto(?Fred)
rw
User
User
Posts: 27
Joined: Mon Sep 04, 2006 9:55 pm

Post by rw »

Hi!

You are really fast!

Tested egrid with Purelvsort.
All Ok here.

One question:

How can i set the egrid selection box on a specific col/row
after the focus ist lost?

Keep up the good work

grettings

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

Post by srod »

rw wrote:Hi!

You are really fast!
That's funny, my girlfriend said that just the other night! :?
Tested egrid with Purelvsort.
All Ok here.

One question:

How can i set the egrid selection box on a specific col/row
after the focus ist lost?

Keep up the good work

grettings

rw
Use the command

Code: Select all

egrid_SelectCell(gadgetnum, columnindex, row, editingcell)
with the parameter 'editingcell' = 1 if you want to go directly into 'edit' mode.

I'm currently adding button type cells at the moment and so hope for an update later tonight.
I may look like a mule, but I'm not a complete ass.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Great!!

One question:

Is possible to add different icons to different cells?? (Not always same icon to all column i mean)

*Now im your customer, i buy your product!! ;)
Last edited by ricardo on Tue Oct 17, 2006 8:29 pm, edited 1 time in total.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

ricardo wrote:Great!!

One question:

Is possible to add different icons to different cells?? (Not always same icon to all column i mean)
Absolutely. No problem at all. You can have as many different icons as their are cells etc.

In the #egrid_NotifyCellType message in the CellCallback function you simply need to return different icon handles depending on which cell is being examined etc.

:)
I may look like a mule, but I'm not a complete ass.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

srod wrote:
ricardo wrote:Great!!

One question:

Is possible to add different icons to different cells?? (Not always same icon to all column i mean)
Absolutely. No problem at all. You can have as many different icons as their are cells etc.

In the #egrid_NotifyCellType message in the CellCallback function you simply need to return different icon handles depending on which cell is being examined etc.

:)
Thanks for your answer!! :)

Can you give a short example please to this registered user of your product? ;)
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

At the minute I'm busy adding an extra celltype (command buttons) which is 70% done so a bit pushed for time at the moment.

The following is untested but should ( :) ) fill an entire grid (so it is overkill!) with icons in such a way that consecutive cells alternate between two icons which you'll have to supply yourself. Set your icon handles icon1 and icon2 to global variables.

Code: Select all

 Case #egrid_NotifyCellType
    *cellinfo\celltype=#egrid_Icon
    If (*cellinfo\column+*cellinfo\row)&1 
      *cellinfo\param=icon1 ;Set to 0 for no icon.
    Else
      *cellinfo\param=icon2 ;Set to 0 for no icon.
    EndIf
Take care to replace the entire #egrid_NotifyCellType message handler with the above.
I may look like a mule, but I'm not a complete ass.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post by ricardo »

Great!!

One more question:

Can i 'hide' and then 'show' some cells?

I saw some egrid_MakeCellVisible(gadgetnum, columnindex, row)
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

ricardo wrote:Great!!

One more question:

Can i 'hide' and then 'show' some cells?

I saw some egrid_MakeCellVisible(gadgetnum, columnindex, row)
Depends on what you mean?

The command egrid_MakeCellVisible() was introduced because of the fact that, through your CellCallback function, you can prevent the user selecting (by any means; keyboard, mouse clicks etc.) certain cells.

Imagine that you code your CellCallback function so that, when the user attempts to select cells in column 0, you instead move the focus onto the corresponding cell in column 1 (this is easy to do). Now this could result in column 0 remaining invisible if you first scroll the grid so that column 0 was not visible and then hit CTRL/HOME (for example).

To get around this, you can use the command egrid_MakeCellVisible() to make the cell in column 0 visible even though you move the focus to column 1 etc. It can be quite effective.

Other than redirecting cell selections etc. it is not really possible to hide cells.
I may look like a mule, but I'm not a complete ass.
Post Reply