unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, NxGridView6, NxColumns6, NxControls6, NxCustomGrid6, NxVirtualGrid6, NxGrid6, NxTypes6; type TForm1 = class(TForm) NextGrid61: TNextGrid6; NxIncrementColumn61: TNxIncrementColumn6; NxCheckBoxColumn61: TNxCheckBoxColumn6; NxTextColumn61: TNxTextColumn6; NxReportGridView61: TNxReportGridView6; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin NxIncrementColumn61.Header.Caption := 'No'; NxCheckBoxColumn61.Header.Caption := 'Select'; NxTextColumn61.Header.Caption := 'String'; with NextGrid61 do begin Caption := ''; SelectionColor := $0097E4FB; AlternatingRowColor := $00EDF5E9; AppearanceOptions := AppearanceOptions + [aoAlternatingRowColors]; Columns[0].Alignment := taRightJustify; Columns[1].Alignment := taCenter; // error // Columns[1].Alignment := TAlignment(2); Columns[2].Alignment := taLeftJustify; AddRow(10); end; end; end.
Setting "taCenter" as Alignment of the column causes an error.
#1
Posted 15 February 2018 - 05:23 PM
#2
Posted 15 February 2018 - 08:08 PM
You can use Classes.taCenter together and it should work.
Hope it helps.
--
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.
#3
Posted 16 February 2018 - 05:41 AM
Hi Boki,
Thank you for your immediate reply.
I have manually added NxTypes6 to the [uses] section.
Because for "aoAlternatingRowColors" of AppearanceOptions.
In the source code of Form 1 shown previously, a compile error actually occurs.
Where is it wrong?
Thank you.
#4
Posted 16 February 2018 - 09:10 PM
Did you maybe tried to write Columns[1].Alignment := Classes.taCenter;
--
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.
#5
Posted 17 February 2018 - 06:18 AM
Hi Boki,
I did not notice the method.
Thanks to you, I solved it well.
#6
Posted 16 February 2019 - 01:16 PM
Hi
I have the same problem II makes a error using taCenter.
I try to use =Classes.taCenter; but it gives me an error that not defined,.
Any idea.?
#7
Posted 16 February 2019 - 01:57 PM
You can try with NxTypes6.taCenter. It can depends from Delphi versions.
--
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.
#8
Posted 16 February 2019 - 06:00 PM
HI
The same
[dcc32 Error] E2010 Incompatible types: 'TAlignment' and 'TNxTextAlign'
My Delphi is XE 10 Tokyo
#9
Posted 16 February 2019 - 06:05 PM
Can you then try to use TAlignment.taCenter. Hope this will work
--
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.
#10
Posted 16 February 2019 - 06:11 PM
Hi
Solved, it must be
system.Classes.taCenter;
Topic closed.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users