Jump to content


Photo

TNxListColumn with InplaceEdit TNxComboBox

TNxComboBox TNxListColumn

  • Please log in to reply
3 replies to this topic

#1 Tracer

Tracer
  • Members
  • 7 posts

Posted 11 November 2019 - 06:02 PM

Hello Berg-team,

 

 

I have a TNxListColumn with a different Font-Style. I use the Function InplaceEdit with a TNXComboBox.

If i Select the component and the TNXComboBox is aktive and show the Items, the Selected item is a Number( the Index of the Items) see photo.

How can I Change this? How can to that, the entry 'Marketing' is in the ComboBox

 

Best regards

Markus

Attached File  ListColumn1.PNG   28.41KB   0 downloads



#2 Tracer

Tracer
  • Members
  • 7 posts

Posted 11 November 2019 - 06:30 PM

Ok for a better understanding:

 

if i set the font-size higher it looks like so in a normal TNxListColumn:

 

Attached File  ListColumn1_ItemsHeight.PNG   34.55KB   0 downloads

 

in the listbox is selected the 'Accounting' and in the 'EditField' is the string value 'Accounting' too.

But the items-height is not perfect from the font-size.

 

if i take the TNxComboBox as a ImplaceEdit i can change the ItemsHeight and other propertys like so:

 

Attached File  ListColumn1_ItemsHeightFromComboBox.PNG   30.08KB   0 downloads

 

and that its what i want from style.

But the 'EditField' is selected the index value and in the listbox is nothing selected.

 

how can i fix them the ImplaceEdit TNxComboBox looks like a normal TNxListColumn

 

best regards

Markus



#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 7,838 posts
  • Gender:Male

Posted 11 November 2019 - 08:51 PM

Hello Markus,

 

Unfortunately I was not able to understand properly. Do you maybe need to best fit row after FontStyle is changed?


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

#4 Tracer

Tracer
  • Members
  • 7 posts

Posted 12 November 2019 - 01:44 PM

Hello Boki,

thx for your reply.

 

Not fit of the gridrow-size, fit for the listboxrow they get open in  the TNxListColumn. The item hight size for the listbox is not correct.

 

And the when i do it with a TNxComboBox in ImplaceEdit i can set the ItemHight size in the property from TNxComboBox but in the enter it shows the index looks like '0' or so on.

 

My solution for the TNxComboBox poblem is now:

 

procedure TForm1.NextGrid1EditEnter(Sender: TObject);
begin
    if(NextGrid1.SelectedColumn = 5)then
    begin
      FSelectedLBIndex := NextGrid1.Cell[NextGrid1.SelectedColumn,NextGrid1.SelectedRow].AsInteger; //save the listbox index
      if(FSelectedLBIndex > -1 )then
      begin
        NxComboBox1.Text :=  NxComboBox1.Items[FSelectedLBIndex];
      end;
    end;
end;

 

and when get out from control

 

procedure TForm1.NextGrid1EndEditing(Sender: TObject; ACol, ARow: Integer;
  var Value: WideString; var Accept: Boolean);
var
  selIndex : Integer;
begin
    if(NextGrid1.SelectedColumn = 5)then
    begin
      selIndex := NextGrid1.Cell[NextGrid1.SelectedColumn,NextGrid1.SelectedRow].AsInteger;
      if(selIndex = -1 )then
      begin
        if(FSelectedLBIndex > -1)then
        begin
        NextGrid1.Cell[NextGrid1.SelectedColumn,NextGrid1.SelectedRow].AsInteger := FSelectedLBIndex; // set the saved listbox index
        end;
      end;
    end;
end;

 

best regards

Markus







Also tagged with one or more of these keywords: TNxComboBox, TNxListColumn

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users