Jump to content


Photo

NextGrid5 -> NextGrid6 upgrade


  • Please log in to reply
126 replies to this topic

#41 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 21 February 2018 - 10:16 AM

Hi, Boki:

Here is more:

 

GetRowAtPos = View.GetItemAtPos DOES NOT SEEM TO EXIST in the latest source code.

NxToolButton6 does not have Visible property

NxToolButton.OnClick?

GetLastChild() = ?

ReadOnly = ?
VisibleRows = ?

MoveSelectionDown = ?
MoveSelectionUp = ?
GridSpace = ?

InnerWidth = ?

RefreshRange = ?
NoSelection (deselects rows) = ?
RefreshColumn=?

IsTextFit = ?

GetCellTop = ?

ColumnType = ctBoolean, ctDate, ctString HOW DO I GET THIS INFORMATION?

ShowLines = True; for NxTreeColumn; doesn’t appear to be available any longer
 TNxComboBox6(Columns[ACol].Editor).DroppedDown := True; EDITOR no longer exists.

 Options := Options + [coEditing, coCanInput] - [coCanSort] -

          [coEditorAutoSelect] How do I get these settings?

aoIndicateSelectedCell

ChangePosition

WrapKind

 

with gridSelectNMTPaths.Columns[ACol].Display do
      begin
        ClientRect := CellRect;
 ==>       AsBoolean := gridSelectNMTPaths.Cell[ACol, ARow].AsBoolean; ASBOOLEAN is now undeclared
        Paint;
      end;
Ok, that seems to be most of the missing or changed items. I notice I already have many items with equivalents in NG6, but need to apply the changes to my code. Will be doing that and if you can guide me on the above two posts, I should be close to being able to compile my program.
Thank you!
Chuck


#42 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 21 February 2018 - 10:22 AM

Oops, one more:

Column.Exists = ?



#43 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 February 2018 - 01:27 AM

Hi,

This is a first part.

GridSpace = Try to use Grid.ActiveView.GridSize[Location]. TNxLocation = (loBottom, loLeft, loRight, loTop);
GetRowAtPos = NxReportGridView61.GetItemAtPos. So ReportView have it. Maybe I can move it one place up.
MoveSelectionUp/Down = NextGrid61.MoveByRow. You can put 1 or -1.
Column.Exists = NextGrid61.Columns.Exist()
AsBoolean = require NxCells6 in uses section probably.
NoSelection = NextGrid61.SelectNone.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#44 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 February 2018 - 07:58 PM

Editor = InplaceEdit now.
WrapKind = Is there but not for all column types, for example ones that have no Text to wrap (like Icon column).
ColumnType = There is a DataType (TNxDataType6 in NxTypes6 unit).
coEditing = Column.Editing
coInput = Column.Inserting
ShowLines = Should be there. Maybe you need to recompile package?
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#45 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 22 February 2018 - 07:59 PM

Hi,

Also every column now have OnStyleText and OnGetHint events. But also you can set .Font property of cell.

Like this:

  NextGrid61.Cell[2, 2].Font.Color := clRed;

boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#46 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 24 February 2018 - 04:38 PM

GetRowAtPos = NxReportGridView61.GetItemAtPos. So ReportView have it. Maybe I can move it one place up.

 

PLEASE! Right now, because I refer to Grid.ActiveView, I need to explicitly cast as TNxReportGridView6(ActiveView) to get this method. This seems messy and tedious at the coding level. 

Thanks,

Chuck



#47 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 24 February 2018 - 07:51 PM

Hi,

I will probably do it. I need to check if is not in conflict with something else, but I will probably move it.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#48 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 February 2018 - 12:15 PM

Hi, Boki:

Looks like I need a way to determine if a column has the property Wrapkind now that not all column classes have this property.

 

How do I do this?

Thank you,

Chuck



#49 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 February 2018 - 12:46 PM

Hi, Boki:

In Grid.OnBeforeSelect, there was in NG5 an ACCEPT parameter which determined if the OnSelect fired. I notice that you removed that parameter in NG6. How do I stop the firing of OnSelect without this parameter?

 

as in:

 if (ACol = 0) and Assigned(frmVernierScale) and frmVernierScale.Visible then
  begin
    Accept := false;
....


#50 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 February 2018 - 01:04 PM

Hi, Boki:

 

In NG5 OnVerticalScroll has a POSITION parameter, but NOT in NG6. This parameter is used in all my code use of Vertical/Horizontal Scroll. How do I work around this?

Thank you,

Chuck



#51 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 February 2018 - 01:18 PM

Hi, Boki:

 

In NG5: AddChildRow(SelectedRow, crLast);

In NG6: AddChildRow(const Index, Count: Integer;  IgnoreDefaults: Boolean):

SelectedRow = Index/INxRow, 

Count = number of rows to add? PLEASE CONFIRM

IgnoreDefaults: where are the defaults set for adding child rows, specifically how do I make sure crLast from NG5 is followed?

 

Thank you,

Chuck



#52 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 27 February 2018 - 08:42 PM

Hi, Boki:
Looks like I need a way to determine if a column has the property Wrapkind now that not all column classes have this property.
 
How do I do this?
Thank you,
Chuck


You can check if is INxWrapable or use Support method (as can be used for all interfaces in Delphi).
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#53 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 27 February 2018 - 08:43 PM

Hi, Boki:
 
In NG5 OnVerticalScroll has a POSITION parameter, but NOT in NG6. This parameter is used in all my code use of Vertical/Horizontal Scroll. How do I work around this?
Thank you,
Chuck


You can access VertScrollBar.Position property inside event.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#54 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 27 February 2018 - 08:44 PM

Hi, Boki:
In Grid.OnBeforeSelect, there was in NG5 an ACCEPT parameter which determined if the OnSelect fired. I notice that you removed that parameter in NG6. How do I stop the firing of OnSelect without this parameter?
 
as in:
 if (ACol = 0) and Assigned(frmVernierScale) and frmVernierScale.Visible then
  begin
    Accept := false;
....


You can use OnSelectQuery event. There you can use Accept parameter.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#55 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 27 February 2018 - 09:38 PM

Hi, Boki:
 
In NG5: AddChildRow(SelectedRow, crLast);
In NG6: AddChildRow(const Index, Count: Integer;  IgnoreDefaults: Boolean):
SelectedRow = Index/INxRow, 
Count = number of rows to add? PLEASE CONFIRM
IgnoreDefaults: where are the defaults set for adding child rows, specifically how do I make sure crLast from NG5 is followed?
 
Thank you,
Chuck


Yes, count is number of rows.
IgnoreDefaults if set to True (default, for optimization when adding thousands of rows) DefaultValue property of Column will be ignored.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.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.

#56 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 February 2018 - 10:13 PM

Hi, Boki:

Thank you for you quick response!

A couple of followup questions:

 

1. "You can check if is INxWrapable or use Support method (as can be used for all interfaces in Delphi)"

 

How do I actually code for the check if INxWrapable? Can you give me an example.

So, I am not familiar with a "support method" which can be used in Delphi interfaces. Can you point me to an example in your code or what I need to google to find out more?

 

Thank you,

Chuck



#57 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 February 2018 - 10:18 PM

Hi, Boki:

 

"IgnoreDefaults if set to True (default, for optimization when adding thousands of rows) DefaultValue property of Column will be ignored."

 

Back to my original question: how do I make sure I get the same effect in the NG6 AddChildRow as NG5 AddChildRow with crLast?

 

Is crLast, i.e. adding the child row to the bottom of the child rows, default in NG6? If I want to add the child row FIRST, i.e. top of the child rows, how would I do that? In other words, what are the "defaults" of this method that are ignored and can they be manipulated?

 

Thank you,

Chuck 



#58 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 28 February 2018 - 04:32 AM

Hi, Boki:

RE: is a column wrapable?

So, I found some information about Supports() and see some code in yours.

Can I simply do the following in a function?:

 

Supports(Column, INxWrapable, Result);

 

or simply:

Supports(Col, INxWrapable ) 

 

That is taken directly from your TNxTextColumnView.GetWrapable function. What I need is something that works for all columns and returns FALSE if it is not wrapable.

Thank you,

Chuck



#59 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 02 March 2018 - 10:55 AM

Hi, Boki:

 

NG5: TNxMemoInplaceEdit has a very useful button, but the NG6 TNxMemo6 does not. Is it possible to use the NG5 component in NG6? If not, can you add the TNxMemoInplaceEdit to the NG6 editors?

 

Answering: can I use a NG5 NxMemoInplaceEdit: NO! 

 

Would be nice to have a NG6 version of this component.

 

Thank you,

Chuck



#60 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 02 March 2018 - 11:36 AM

Hi, Boki:

I have been having consistent issues with double clicking on the Design page with the visual NextGrid to bring up the columns editor dialog and having it throw an AV by delphi. The dlg shows but none of the columns.

 

Do you know what is going on?

Thanks,

Chuck






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users