Hi Boki,
What property or properties determine whether or not a TNxMemoColumn6 displays multiple lines in a TNextGrid6?
Thanks.
= Steve
Posted 23 March 2021 - 07:46 AM
Hi Boki,
What property or properties determine whether or not a TNxMemoColumn6 displays multiple lines in a TNextGrid6?
Thanks.
= Steve
Posted 23 March 2021 - 01:09 PM
Hi,
Wondering does MultiLineEditOptions property helps you? There is at the moment single flag there.
Posted 24 March 2021 - 01:01 AM
Hi,
Wondering does MultiLineEditOptions property helps you? There is at the moment single flag there.
I'm trying to set this in code. Is this the correct way?
var NewColumn: TNxColumn6; begin FGrid.BeginUpdate; FProviders.AddObject(AProviderName, TObject(AProviderID)); NewColumn := FGrid.Columns.Add(TNxMemoColumn6, AProviderName); NewColumn.AutoSize := False; NewColumn.DrawingOptions := [doContent,doCustom]; NewColumn.Editing := False; NewColumn.OnDrawBackground := ColumnDrawBackground; NewColumn.Resizeable := False; NewColumn.VerticalAlignment := taAlignTop; NewColumn.Width := 240; NewColumn.Header.Font.Name := 'Segoe UI'; NewColumn.Header.Font.Size := 12; NewColumn.Header.Font.Style := [fsBold]; NewColumn.Header.Alignment := taCenter; NewColumn.Header.Color := FHeaderColour; NewColumn.Header.HideArrow := True; NewColumn.Header.Clickable := False; TNxMemoColumn6(NewColumn).MultiLineEditOptions := [meWordWrap];
I'm referring to the last line above.
Thanks.
= Steve
Posted 24 March 2021 - 10:38 AM
Hi,
Yes, this is ok, but you can also declare your variable at the top to be TNxMemoColumn6.
Posted 25 March 2021 - 03:31 AM
Hi,
Yes, this is ok, but you can also declare your variable at the top to be TNxMemoColumn6.
If I do that, what object do I use here: NewColumn := FGrid.Columns.Add(TNxMemoColumn6, '');
Posted 25 March 2021 - 03:35 AM
var NewColumn: TNxColumn6; begin FGrid.BeginUpdate; FProviders.AddObject(AProviderName, TObject(AProviderID)); NewColumn := FGrid.Columns.Add(TNxMemoColumn6, AProviderName); NewColumn.AutoSize := False; NewColumn.DrawingOptions := [doContent,doCustom]; NewColumn.Editing := False; NewColumn.OnDrawBackground := ColumnDrawBackground; NewColumn.Resizeable := False; NewColumn.VerticalAlignment := taAlignTop; NewColumn.Width := 240; NewColumn.Header.Font.Name := 'Segoe UI'; NewColumn.Header.Font.Size := 12; NewColumn.Header.Font.Style := [fsBold]; NewColumn.Header.Alignment := taCenter; NewColumn.Header.Color := FHeaderColour; NewColumn.Header.HideArrow := True; NewColumn.Header.Clickable := False; TNxMemoColumn6(NewColumn).MultiLineEditOptions := [meWordWrap]; FGrid.EndUpdate; end;
For some reason, the memo field isn't resizing the row to show the contents (see attached image). Is there anything that could prevent this from working?
= Steve
Posted 25 March 2021 - 10:36 PM
If I do that, what object do I use here: NewColumn := FGrid.Columns.Add(TNxMemoColumn6, '');
This line is still the same.
Posted 26 March 2021 - 02:17 AM
If I do as you suggested I get an error:
var NewColumn: TNxMemoColumn6; begin FGrid.BeginUpdate; FProviders.AddObject(AProviderName, TObject(AProviderID)); NewColumn := FGrid.Columns.Add(TNxMemoColumn6, AProviderName); NewColumn.AutoSize := False; NewColumn.DrawingOptions := [doContent,doCustom]; NewColumn.Editing := False; NewColumn.OnDrawBackground := ColumnDrawBackground; [dcc32 Error] UnitDayPlanner.pas(375): E2010 Incompatible types: 'TNxMemoColumn6' and 'TNxColumn6'
Posted 26 March 2021 - 02:19 AM
Anyway, the more important issue is that the memo cell doesn't expand to fit the text, even though MultiLineEditOptions is set to [meWordWrap];
Is there another property that could stop that from working?
= Steve
Posted 27 March 2021 - 11:52 AM
Hi Steve,
You can try to set AutoFit property or use BestFitRow after the editing is finished.
Posted 29 March 2021 - 07:31 AM
Thanks you. Using a combination of those properties I managed to get it to work.
= Steve
0 members, 1 guests, 0 anonymous users