Hello,
Is there a way to have a particular hint when mouse is over the tab (where the caption is) of a tabsheet?
Tabsheet component has a red colored property "customHint" in IDE, what is its purpose, how to use it?
Regards.
There have been 11 items by qi130 (Search limited from 20-April 23)
Posted by qi130 on 03 December 2023 - 08:19 PM in Next Collection
Hello,
Is there a way to have a particular hint when mouse is over the tab (where the caption is) of a tabsheet?
Tabsheet component has a red colored property "customHint" in IDE, what is its purpose, how to use it?
Regards.
Posted by qi130 on 22 August 2023 - 07:45 PM in General Discussion
Hello,
I use to work with both Delphi XE5 and XE10 (Berlin) and after installing Next components, I can play with them.
I've recently installed Delphi Community Edition, how can I register Next components under this newly Delphi platform?
Should I uninstall first and reinstall the components ?
Could I "replay" the install process without uninstall ? (of course with the same V5 package)
Other way?
Thx.
Posted by qi130 on 05 May 2023 - 06:07 PM in NextGrid Component
Hello boki,
I can see that each TNxCustomColumn have a public "Display" property
property Display: TColumnDisplay read FDisplay;
Looking at TColumnDisplay, i see:
TColumnDisplay = class(TVirtualColElement) ... procedure DrawHintMark; virtual;
where TVirtualColElement have a public Canvas property
And this procedure ...
procedure TColumnDisplay.DrawHintMark; begin with Canvas do begin Pen.Color := clRed; Brush.Color := clRed; Polygon([Point(ClientRect.Right - 5, ClientRect.Top), Point(ClientRect.Right - 1, ClientRect.Top), Point(ClientRect.Right - 1, ClientRect.Top + 4)]); end; end;
... is what I ask in a previous topic
I try to call it from my app at the end of Formcreate
NxCol_Colonne.Display.DrawHintMark;
giving an access violation.
I try in debug mode and I see that NxCol_Colonne.Display.canvas value is nil
Is there a way to fix it?
Posted by qi130 on 18 January 2023 - 03:48 PM in NextGrid Component
Hello !
I need to get the row number. Unfortunatly, the only parameter for the ButtonClick event manager is "Sender:TObject"
How to deal with the Sender to get the Arow value for the button?
Thx.
Posted by qi130 on 06 January 2023 - 05:05 PM in NextGrid Component
Thx Bok for your reply
I'm in progress with informations provided...
When I need a NumberColumn, I do the following
GridResultat.Columns.Add(TNxNumberColumn,Entete ); // "Entete" can contain SQL columnname or SQL alias ( ... as ...) if provided GridResultat.Columns[j].Name:=DC_Query.Fields.SqlName[j]; // in runtime, no default name for NxColumn TNxNumberColumn(GridResultat.Columns[j]).EmptyCaption:='<null>'; TNxNumberColumn(GridResultat.Columns[j]).HideWhenEmpty:=True;
then, when processing the result of the query:
while not DC_Query.Eof do begin GridResultat.AddRow(1); i:=GridResultat.LastAddedRow; for j :=0 to DC_Query.Fields.FieldCount-1 do if DC_Query.Fields.IsNull[j] then if GridResultat.Columns[j] is TNxNumberColumn then GridResultat.Cell[j,i].Empty:=True else GridResultat.Cell[j,i].AsString:='<null>' else if DC_Query.Fields.IsBlobText[j] then ...
In debug mode, the flow is correct.
Unfortunatly, Cells never show <null> for null numeric field from the query. Corresponding cells are just empty
I'm sure I miss something, but don't know what
Any idea?
Posted by qi130 on 05 January 2023 - 11:10 PM in NextGrid Component
Hello !
In my app, I create columns in an empty grid depending on SQL definition of the queried fields
I.e char or varchar => textcolumn, numeric (int, float,...)=> Numbercolumn, etc.
GridResultat.Columns.Add(TNxNumberColumn,DC_Query.Fields.SqlName[j] );
=> the header caption is correctly set with Fields.SqlName
I've found a bug in my app for Numbercolumn when trying to set cell content for a SQL null :
if DC_Query.Fields.IsNull[j] then GridResultat.Cell[j,i].AsString:='<null>'
=>
'<null>' is not a correct float value
Several topics in the forum refer to HideWhenEmpty and EmptyCaption properties, but I'm not able to access them in runtime
TNxNumberColumn(GridRequete.ColumnByName[DC_Query.Fields.SqlName[j]]).HideWhenEmpty:=true;
or
(GridRequete.ColumnByName[DC_Query.Fields.SqlName[j]] as TNxNumberColumn).Header.Caption // in a MessageBox
both fire an access violation
What is the correct syntax to proceed?
Thx
Posted by qi130 on 04 January 2023 - 11:58 AM in NextGrid Component
Finally; I did it
1) global var to store Y initial value of mouse cursor
PrevMouseY:Integer;
2) set this var in the MouseDown event
PrevMouseY:=Y;
3) Add 2 small imbeded functions in DragOver event
function MouseMoveUP(y:Integer):Boolean; begin if Y<PrevMouseY then begin PrevMouseY:=Y; Result:=True; end else Result:=False; end; function MouseMoveDown(Y:Integer):Boolean; begin if Y>PrevMouseY then begin PrevMouseY:=Y; Result:=True; end else Result:=False; end;
4) Add this code in DragOver event
i:=(GridRequete.Height - GridRequete.HeaderSize) div 4; if MouseMoveUP(Y) and (Y < i) then GridRequete.VertScrollBar.Prior; if MouseMoveDown(Y) and (Y > 3*i) then GridRequete.VertScrollBar.Next;
the and (Y condition prevent immediate scroll
Posted by qi130 on 03 January 2023 - 01:09 AM in NextGrid Component
Thx for reply.
Unfortunatly, header hint is yet set. But the hint appears only when cursor is flying over. In most time, the cursor is all round the header; that why I asked for the red square as it can be a visual signal to notify a user about information...
I'm working on a SQL query buider.
My grid contains a column 'column name'; with a cell for each column of the previously selected tables. each cell is colored depending on technical attributes (ie mandatory:PK or not null w/o default, etc). for each cell the hint contains the SQL definition (ie integer, date) and the parent table.
And the header hint explains the colors.
This light conception prevents the need of numerous permanent columns : parent table name (Text), SQL definition (text), PK & NotNull & default (check) as the grid is yet full of query related columns like new value and others to build the "where" part with a "join" possibility
I guess this red square in the header is a user friendly reminder...
Regards.
Posted by qi130 on 03 January 2023 - 12:11 AM in NextGrid Component
Hello ! (and happy new year )
Is there a way to fire grid scrolling when mouse cursor approaches the top/bottom (depending on the mouse direction) of the grid while dragging ?
Thx.
Posted by qi130 on 28 December 2022 - 08:19 PM in NextGrid Component
Hi Boki,
Thanks for reply.
I'm talking about the header cell !
User cases for header are sorting, sizing or moving column; so the mouse cursor move over the header, and this event show the hint.
But, when user just looks at datas in the grid (95% of the time or more?), the mouse moved from buttons (like ok/cancel) to scroll bars, there is nothing to notify him about a hint for a particular column header cell.
I suggest a red square appears when the header hint exists (only for the header cell, not all the column)
User xp: ho ho ho what's about this little red square in the column header... let's have a look... whaou ! the soft notifies the sum of the data in the column through the hint
Posted by qi130 on 26 December 2022 - 01:57 PM in NextGrid Component