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

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
jqn
User
User
Posts: 97
Joined: Fri Oct 31, 2003 3:04 pm

Post by jqn »

Hi srod,
Very useful library... But it not compile with "/thread" switch.

It produces a linker error :

Code: Select all

POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
regards
JOAQUIN
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

I haven't used the threadsafe switch. Will Tailbite handle it correctly?
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 »

srod wrote:I haven't used the threadsafe switch. Will Tailbite handle it correctly?
I had to build a custom version of Tailbite to handle it ( http://www.purebasic.fr/english/viewtop ... &start=392 )
TAILBITE.PB

Code: Select all

...
; gnozal
Global UseThreadOption
;
...
ForEach Parameter()
  Select UCase(Left(Parameter(), 5))
    ; gnozal
    Case "/THRD"
      UseThreadOption = 1
    ;
    Case "/ASKD"
      AskDelete = 1
...
PBCOMPILE.PB

Code: Select all

Procedure PBCompile(ThisFile$, ExeName$, Extra$, Icon, DelFolder$, fatal)
...
  If Icon
    CmdLine$+" /ICON "+q+GetPathPart(ThisFile$)+"Windows.ico"+q
  EndIf
  
  ; gnozal
  If UseThreadOption
    CmdLine$+" /THREAD"
  EndIf
  ;
...
And then I use a subsystem to handle both lib versions :
- the standard version, located in %Purebasic%\PureLibraries\UserLibraries\ ;
- the thread-safe version, located in %Purebasic%\SubSystems\UserLibThreadSafe\PureLibraries\ .
In order to use the library in thread-safe mode (compiler option /THREAD), you have to enable the subsystem 'UserLibThreadSafe' in the PB IDE, or add '/SUBSYSTEM UserLibThreadSafe' to the PBCompiler arguments. In jaPBe, do nothing : it will automatically enable the 'UserLibThreadSafe' subsystem to use the threadsafe versions of the installed userlibraries
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 »

Interesting.

Are you saying that I have to edit the Tailbite sources as you've shown, and then recompile?

If so, where do I find the sources?

Mind you, I'm still completing the lib anyhow!
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 »

srod wrote:Are you saying that I have to edit the Tailbite sources as you've shown, and then recompile?
Yes
srod wrote:If so, where do I find the sources?
Where you found tailbite :wink: http://inicia.es/de/elchoni/TailBite/
Tailbite manual wrote:The source is included in the 'src.pack' file. Put it in the TailBite folder. Then, run TBManager.exe and click on the 'Extract TailBite sources' button. You'll be prompted for an unpack folder, select it and all the TailBite sources will be extracted there.
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.

egrid is now nearing the point where I'm happy with it. I've managed to kick Win 98 in the nether-regions enough to persuade it to run egrid 4 without foaming at the mouth.

Once I've rebuilt the lib I'll have a crack at producing a threadsafe version.
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 »

Hi,

I apologise for the delay in reinstating egrid 4, but I've made quite a number of changes and indeed we are now at beta 2.

I've considered carefully the fact that I've worked (on and off) upon this library for practically a year now and intend to continue working on improving it. Couple this with the fact that I am now self-employed and I find myself, albeit a little sheepishly, having to ask for a small remittance from those wishing to use this software.

Those who know my record on these forums I think will respect the fact that I have not made this decision lightly, but this project is now a serious investment of my time, more so than I ever envisaged! It is this investment of time and effort which has inevitably led to this decision.

Anyhow, enough of the piffle! I've created a small website dedicated to egrid which will give you some idea of the background and the future of the product. You can download a 'restricted' version of the library, which apart from limiting the number of rows you can add to an egrid (and popping up some annoying messages!) is otherwise fully functional.

The address: http://www.purecoder.net/egrid.htm

Please do not hesitate to get in touch (through the site) if you have any questions or observations etc.

Regards.
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 »

There are problems with the upper border (selection) line, if I use a row height of '16'. With a height of '18' the border will be shown correct.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Post by Thorsten1867 »

I can't find a the egrid-version of 'ClearGadgetItemList(#Gadget)'.
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 »

Thorsten1867 wrote:There are problems with the upper border (selection) line, if I use a row height of '16'. With a height of '18' the border will be shown correct.
Yes, you must ensure that the row height is sufficient for the fonts being used where the selection box is concerned. I'd advise adding 50% on to the font size; just to be sure.

The thing is that the box is now drawn 'inside' the cell (which apart from everything else; looks better!) and so if using an #egrid_String cell type, the edit control used to edit the cell can clash with the border if the row height is too narrow. No way around this except to ensure the row height is large enough to accommodate all fonts being used. The alternative is that the edit control would not align perfectly with the underlying cell text and that is something I'm not prepared to allow.

There's no reason for this to be a problem as you have full control over the fonts used and the row height.
Last edited by srod on Sat Sep 30, 2006 12:16 pm, edited 1 time in total.
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 »

Thorsten1867 wrote:I can't find a the egrid-version of 'ClearGadgetItemList(#Gadget)'.
Doh!

Will be added asap.
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 »

**UPDATE: 30 September 2006.
  • Bug fixed. When removing all rows, part of the header would also vanish!
  • Added command: egrid_ClearRows(gadgetnum)
http://www.purecoder.net/egrid.htm
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 converted the 16 egrids in my program and it seems to work. :D

Now I'm trying to create a copy & paste function (right mouse button).
What's the correct usage of 'egrid_CopyCells(gadgetnum, left, top, right, bottom)'?
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 »

Thorsten1867 wrote:I've converted the 16 egrids in my program and it seems to work. :D

Now I'm trying to create a copy & paste function (right mouse button).
What's the correct usage of 'egrid_CopyCells(gadgetnum, left, top, right, bottom)'?
Sorry, the form for the command is

Code: Select all

egrid_CopyCells(gadgetnum, column, row, xcols, yrows)
e.g.

Code: Select all

egrid_CopyCells(gadgetnum, 10, 4, 5, 6)
will copy a rectangular grid of cells starting from cell (10, 4), i.e. the 11th column 5th row, and of dimensions 5 cells by 6 cells.
This will thus copy from (10, 4) to (14, 9) inclusive.

I coded things this way because you might allow the user to reorder the columns by click and drag etc. In these cases, the command will still function as required.

I will start work on the chm help file as soon as I'm feeling better. :?
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 »

REMOVED.
Last edited by srod on Mon Oct 02, 2006 1:35 pm, edited 1 time in total.
I may look like a mule, but I'm not a complete ass.
Post Reply