Jump to content


Photo

NextGrid v6 - Updates log

v6

  • Please log in to reply
12 replies to this topic

#1 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 20 March 2013 - 02:55 AM

Dear Users,

Here I will post updates on v6 of NextGrid.

Today I have added a Font (TFont) property to the TNxCell class:

This property is nil by default, to save memory if not used. If user write something like this:

NextGrid61.Cell[1, 3].Font := TFont.Create;
NextGrid61.Cell[1, 3].Font.Name := 'Georgia';
NextGrid61.Cell[1, 3].Font.Size := 12;
NextGrid61.Cell[1, 3].Font.Style := [fsItalic];
NextGrid61.Cell[1, 3].Font.Color := $000080FF;

Font for this cell will be created and set.

Font is automatically released upon cell destroying.

I hope that you like my solution for this long requested feature. Feature is added, but memory is saved when different font is not needed.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 20 March 2013 - 03:04 AM

I also like to note that page for v6 of NextGrid is now active:
http://www.bergsoft....d6/overview.htm
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 DeddyH

DeddyH
  • Members
  • 14 posts

Posted 20 March 2013 - 12:45 PM

The user has to create the font himself? I do not think this is a handy solution, perhaps you could use lazy initialization?

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 20 March 2013 - 01:15 PM

Hello,

Grid check if Font property is nil, and then if is not - it use it. I may add a CreateFont method (with parameters to set in same call)
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 20 March 2013 - 01:39 PM

Now thinking, I may use something like IsFontSet method which will only check for nil, BUT not create a TFont object.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 nano

nano
  • Members
  • 26 posts

Posted 20 March 2013 - 01:39 PM

I support the idea of DeddyH. Lazy initialization is probably the most comfortable way to develope.

property Font: TFont read GetFont;

function GetFont: TFont;
begin
  if not Assigned( FFont )
    FFont:= TFont.Create;
  Result:= FFont;
end;
//
NextGrid61.Cell[1, 3].Font.Name := 'Georgia';



#7 nano

nano
  • Members
  • 26 posts

Posted 20 March 2013 - 01:43 PM

Ps. The Demolink on the Grid v6-Website (http://www.bergsoft....d6/overview.htm) is dead:)

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 20 March 2013 - 01:53 PM

Hi,

I will do this way. Problem was that I am checking Font property when drawing too. I will add IsFontSet method for this.

ps.I will fix link.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 DeddyH

DeddyH
  • Members
  • 14 posts

Posted 20 March 2013 - 03:21 PM

Here is my suggestion (not tested):
property Font: TFont read GetFont write SetFont;

function GetFont: TFont;
begin
  if not Assigned(FFont) then
    FFont := TFont.Create;
  Result := FFont;
end;

procedure SetFont(const Value: TFont);
begin
  if not Assigned(Value) then
    FreeAndNil(FFont)
  else
    Font.Assign(Value);
end;

function IsFontSet: Boolean;
begin
  Result := Assigned(FFont);
end;


#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 20 March 2013 - 06:14 PM

Hi,

Thank you, I have done it in same way.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 24 March 2013 - 03:28 AM

Updated demo project on:
http://www.bergsoft....d6/overview.htm
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 03 April 2013 - 01:40 AM

Hello,

Here is what is happened when you click on Column's icon in columns editor (or you press Enter key):

Attached File  Screenshot_4_3_13_12_38.png   45.08KB   4 downloads

A dialog with common properties will open. I will add several specific properties for each column type in this dialog.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,743 posts
  • Gender:Male

Posted 09 April 2013 - 05:05 AM

Hello,

Here is a small update to the Columns Editor, Quick Properties feature.

I found this feature very neat and handy. I am thinking about improving it even more.

For some properties, I have add a suggested value which is set after you click on button (orange arrow pointing it).

This is very neat for FormatMask and similar properties because saves you for remembering all this masks.

I hope that you like it.

Who is interested in Beta (D2010, DXE2, DXE3), may contact me.

Attached Files


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users