Hello
My ComboBoxEdit doen't show the right ToolTip when closed and a line with a longer text than the box width is selected.
I have set ToolTips to each line in the ComboBox. This is working well.
When the text is shorter than the box width, the ToolTip of the line is shown, when the box is closed.
When the text is longer, the normal text of the item is shown in the tooltip.
Here is my code:
Code<DataTemplate x:Key="IntPropertySelectStyleTemplate">
<localCT:ComboBoxEditWithoutSpinIfNotFocused x:Name="PART_Editor"
ShowBorder="False"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
IsTextEditable="False"
ToolTip="{Binding Path=SelectedItem.ToolTip, RelativeSource={RelativeSource Mode=Self}}"
DisplayMember="Label"
ValueMember="Index"
IsEnabled="{Binding Path=RowData.Row.IsPropertyEnabled}"
ItemsSource="{Binding Path=RowData.Row.ListIndexes}"
EditValue="{Binding Path=RowData.Row.Value_IntPropertySelect, UpdateSourceTrigger=PropertyChanged}" >
<dxe:ComboBoxEdit.ItemContainerStyle>
<Style TargetType="dxe:ComboBoxEditItem">
<Setter Property="ToolTip" Value="{Binding ToolTip}"/>
</Style>
</dxe:ComboBoxEdit.ItemContainerStyle>
</localCT:ComboBoxEditWithoutSpinIfNotFocused>
</DataTemplate>
What can I do?
Thanks for helping
Best regards
Norbert Schmidt, SETEX
Hello Norbert,
I created a simple sample with a ComboBoxEdit declared in GridColumn's CellTemplate. In my tests, the tooltip shown for a ComboBoxEdit is not cropped. Please refer to the attached project and screencast. Could you please modify this project to illustrate the issue?
Just in case, I see that in your current implementation, the editor is not declared according to our recommendations. To be more precise, although you set the editor's name to
PART_Editor
, you bind its EditValue explicitly. This can break the built-in synchronization for this editor and lead to unexpected side effects in validation, synchronization, etc. For more information, refer to the following help topic: ColumnBase.CellTemplate Property. Please consider reworking this editor according to our recommendations and do not bind its EditValue explicitly.Regards,
Andrey
Hello Mr. Marten
Thank you for your very fast answer.
I have opened your project and run it and have the same problems as in my own project.
I didn''t mention it before, but sometimes the ToolTip "Some long text for an item shown in ComboBoxEdit #1" appears
and sometimes the ToolTip "Some long ToolTip for an item shown in ComboBoxEdit #1".
It seems to be alternating, but not every time.
Sometimes only the text "Some long text for an item shown in ComboBoxEdit #1" in displayed in the ToolTip.
It seems moreover that ToolTips of different underlying elements are shown when moving the mouse slowly from the top of the closed ComboBoxEdit to its bottom or the other way around. I think so because the ToolTip is redrawn while doing this and sometimes the other text is shown inside the ToolTip then.
By the way: In my example "localCT:ComboBoxEditWithoutSpinIfNotFocused" is derived from "dxe:ComboBoxEdit".
Regards,
Norbert Schmidt, SETEX
Hello Norbert,
You see different tooltips in cells with ComboBoxEdits because the editor has its own tooltip logic that is used when the editor text cannot be shown entirely. To disable this logic, please set the ShowTooltipForTrimmedText property to False.
Regarding the issue with the cropped tooltip - as I cannot reproduce this problematic behavior on our side, I'll appreciate it if you test this project on multiple different machines to see if this issue is specific to a certain one. If so, please share this machine's environment settings (OS, DPI Settings, installed .NET versions, etc.).
Additionally, please try upgrading your controls to the latest version of our controls (v24.1.11 or v24.2.6) and check if you still see this issue.
I hope to hear from you soon.
Regards,
Andrey
Hello Andrey
I tried the program at another computer, but I saw the problematic behavior there as well.
Is there a way to use "TrimmedTextToolTipContentTemplate" to solve the problem?
I don't know, how to deal with this property.
PS: an upgrade to a newer version is possible, but my application is embedded in a greater workspace and the decision for this step is a longer procedure.
Best regards,
Norbert Schmidt, SETEX
Thank you for the update.
This property is an ordinary DataTemplate property. It works similarly to any other property and allows you to define a custom template to represent data. So, you can define a custom DataTemplate with UI elements, which should display tooltip data. Still, before you start implementing custom templates, let's try determining the cause of the issue so that we can check whether there are better ways.
Could you please specify the OS you use on your machine and DPI settings enabled on it? If you use a non-standard DPI (100%), change it to 100% and check if you still see the issue.
I hope to hear from you soon.
Regards,
Andrey
Hello Andrey
I'm using Windows 11 with DPI 100%.
Regards,
Norbert
I made a video of the behavior.
The problem is on all of our computers.
Regards,
Norbert
Hello Andrey
I have updated DevExpress in a sandbox, first to v24.1.11 and then to v24.2.6.
Both new versions show the same error behavior on my computer.
Best regards,
Norbert