TADvStringGrid -> BtnEdit -> Always show

Hi.


Is there a way to get to editbutton to always be visible, even when the grid is out of focus?

The way it works now, you have to go to the cell, then get the cell in editmode. Then the button shows.

Thanks.

If you want that the button is visible also when the cell is not in edit mode, set grid.ControlLook.DropDownAlwaysVisible := true

Hm, that didn't really work. The buttons visibility works the same, and the edit gets the text of the button (...).

If I use the OnHasEditBtn event, and set HasEditBtn = true, the button will always be visible. However, the edit still gets the buttons text.

I cannot see an issue here. This was retested with a default grid on the form initialized with:

begin
  AdvStringGrid1.ControlLook.DropDownAlwaysVisible := true;
  AdvStringGrid1.DefaultEditor := edEditBtn;
end;

and it shows the inplace editor buttons even when the grid has no focus.

I have reported similar problems in the past and you were unable to reproduce the problem. I never have resolved my issues. I think part of the issue may be the type of editor. Change your example to:

begin
  AdvStringGrid1.ControlLook.DropDownAlwaysVisible := true;
  AdvStringGrid1.DefaultEditor := edColorPickerDropdown;
end;

Also drop a tbutton on the form.
Two things to note:
1. The color pickers are not visible when the form appears. Shouldn't they be visible?
2. Something strange happens when the button is clicked. Try this: double click a cell and select a color. Then click the tbutton. Result: the grid cell does not show the selected color -- just the color name. Is this the correct behavior?  

  1. A color picker is not a combobox, but to force to treat this like a combox, add following event handler:

    procedure TForm1.AdvStringGrid1HasComboBox(Sender: TObject; ACol, ARow: Integer;
      var HasComboBox: Boolean);
    begin
     HasComboBox := true;
    end;

    2. I could not reproduce this issue with the latest version of TAdvStringGrid.

I made the change you suggested and the second problem persisted. Since you can't reproduce it and in the past you have declined to run executables I have sent you (for security concerns) I have recorded a video  to illustrate the problem. Please watch: https://drive.google.com/file/d/0B4dnRMZSx3k6b3JfdVVNUmZWNlE/view?usp=sharing

I took down the link in the previous post. Here is a better recording: https://drive.google.com/file/d/0B4dnRMZSx3k6Tjc3MFNnYUpBOW8/view?usp=sharing

The behavior is by design. The selected cell color has priority over the cell background color to ensure the selected cell remains visible. If you want to override this default behavior, set grid.SelectionColorMixer = true and grid.SelectionColorMixerFactor to 0.