Jump to content


Char Case in NextGrid6

EditCharCase TextTransform

  • Please log in to reply
2 replies to this topic

#1 CurnutteR

  • Members
  • 2 posts

Posted 25 January 2023 - 06:32 PM

Hello Boki,


Do the EditCharCase and TextTransform do anything? I've searched the source files for references to these properties, fields and types, and nothing seems to use them. I even tried "fixing" the usage of FTextTransform in TNxTextColumn6.GetValue, where the enum is tested in a case statement, but nothing happens. I added the below code immediately after the case statement. It worked in that it "uppercased" text I typed in, but programmatically edited cells failed to show any values.

if S <> Result then
   Result := S;

Am I missing something? NextGrid5 seemed to be working ok in this regard.


I am using version 6.8.5 (older versions behaved the same).




#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 25 January 2023 - 11:32 PM



Please try to update this method (It will be also included in the next update):


NxColumns6.pas is the file:


function TNxTextColumn6.GetValue(Cell: INxBase;
  ACol, ARow: Integer): WideString;
  { Actual value }
  Result := Cell.AsString;
  case FTextTransform of
    ttNone: ;
    ttUpperCase: Result := WideUpperCase(Result);
    ttLowerCase: Result := WideLowerCase(Result);
    ttCapitalize: if Length(Result) > 0 then Result := WideUpperCase(Result[1]);
  { Trigger event }
  DoGetValue(ACol, ARow, Result);


Hopefully it will work now. You will need to set TextTransform to the desired transformation.

boki@bergsoft.net | LinkedIn Profile
BergSoft Home Page: www.bergsoft.net
Members Section: bms.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 CurnutteR

  • Members
  • 2 posts

Posted 27 January 2023 - 01:17 PM



Thanks for getting back so quick. That worked.


On the EditCharCase issue, I found why it was not working for TNxTextColumn6. It was because the InplaceEdit used for the TNxTextColumn6 is a TNxEdit6, which doesn't have a EditCharCase property, but rather a CharCase. So making the below change in the TNxTextColumn6.AssignInplaceEdit procedure resolved it.

procedure TNxTextColumn6.AssignInplaceEdit;
  with TNxEdit6(GetComponent(FInplaceEdit)) do
    CharCase := Self.EditCharCase;      // assign CharCase, not EditCharCase
    EditOptions := Self.EditOptions;
    MaxLength := Self.MaxLength;

Hope this helps.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users