Hint rect is randomly sized (well 2 different cases only) when cell's hint is displayed (Text is too long to fit in cell bounds and OptionsBehavior.CellHints property is set to true).
Regards.
Steps to Reproduce:
see attached wmv video and project
Actual Results:
see attached wmv video and project
Expected Results:
Same hint rect when moving cursor over the cell.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Walid,
Thank you for the attached video. It illustrates the problem well.
However, I cannot reproduce the problem on my PC. I've attached my test sample. Please modify it to illustrate the problem or provide us with you own sample. We will test it and try to find the cause of the problem.
Thanks,
Dimitros
Well that's my mistake: I did'nt realize that my PREVIEW Grid Cell has an OnGetCellHint event handler set. That event handler was set to workaround a previous bug in a previous dx build (6.40 OptionsBehavior.CellHints malfunction: Q35943 - Cell hints aren't displayed for multi-line cells)
It's seem to be a conflict between the OnGetCellHint event handler and OptionsBehavior.CellHints := True.
Anyway it seems to be a bug (IMO) because PREVIEW cell (limited to 1 line max) does not show a correct cell hint (compared to standard cell or OnGetCellHint) when OptionsBehavior.CellHints is set to True: the Hint Rect is smaller and text is organized on several lines instead of one (Text is one line and does not contain CR/LF chars)
Best regards and have a nice president.
Hi Walid,
Thank you for the sample project. It was very helpful.
Our developers will research this issue and try to find the cause of the problem. Just give us some time.
Thanks,
Dimitros
Hi Walid,
This behavior is by design. The standard hint is shown only when the mouse cursor is hovering directly over the text. In the sample project, it will be shown in multiple lines. However, if the mouse cursor is hovering over the cell, but not directly over the text, it's impossible to determine whether the hint should be shown in multiple lines. The AIsHintMultiLine variable is False in this situation. I.e. to solve your problem, you should simply assign the True value to the AIsHintMultiLine variable within the OnGetCellHint event handler:
procedure TForm1.cxGrid1TableView1Column3GetCellHint( Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint; var AHintText: TCaption; var AIsHintMultiLine: Boolean; var AHintTextRect: TRect); begin AHintText := VarToStr(ARecord.Values[Sender.Index]); AIsHintMultiLine := True; end;
Alternatively, you can simply check whether the event is called for the text area:
procedure TForm1.cxGrid1TableView1Column3GetCellHint( Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord; ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint; var AHintText: TCaption; var AIsHintMultiLine: Boolean; var AHintTextRect: TRect); begin if AHintText <> '' then AHintText := VarToStr(ARecord.Values[Sender.Index]); end;
I hope this information will help you solve the problem.
Thanks,
Dimitros