Ticket T268676
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

WinForms - It is difficult to distinguish between fields with the same name in Customization Forms

Tooltips in Object Model Popup of CustomizationForm

created 10 years ago

Support ID T169661 explains how to enable tooltips for the ActiveListBox of CustomizationForm. In a XAF application, the Add… button of CustomizationForm invokes a popup window with a caption of Object Model. How do we activate tooltips in that popup too? Thanks.

Show previous comments (4)
MF MF
Michael Folinsbee 8 years ago

    Hi Dennis and Anatol. Curious to know if the ModelBrowser component has been updated to enable tooltip support ?

    Dennis Garavsky (DevExpress) 8 years ago

      Hello Michael,

      We have not touched this internal and undocumented ModelBrowser component so far and also have not planned tooltip support in it for any specific release.
      Internally, this class uses the DevExpress TreeList control for which you can use standard approaches available in its demos, examples, and online documentation. For instance: How to customize the ToolTip for a TreeList cell.
      I will update you soon if we can easily provide access to this TreeList instance for you so that you will be able to implement custom features you wanted on your own side. Thanks.

      MF MF
      Michael Folinsbee 8 years ago

        Thanks Dennis.

        Answers approved by DevExpress Support

        created 8 years ago (modified 7 years ago)

        Thank you for contacting us.
        I have investigated your scenario and introduced necessary changes to our code to make it work.
        Now, you can implement it in the following way:

        C#
        public class Controller1 : ViewController { ColumnChooserControllerBase columnChooserControllerBase; GridEditorColumnChooserController gridEditorColumnChooserController; private void ColumnChooserControllerBase_ColumnChooserExtenderChanged(object sender, ColumnChooserExtenderChangedEventArgs e) { if(e.Extender != null) { e.Extender.ModelBrowserCreated += Extender_ModelBrowserCreated; } } private void Extender_ModelBrowserCreated(object sender, DevExpress.ExpressApp.Win.Editors.ModelBrowserCreatedEventArgs e) { ToolTipController toolTipController = new ToolTipController(); e.ModelBrowser.FieldsTreeList.ToolTipController = toolTipController; toolTipController.GetActiveObjectInfo += ToolTipController_GetActiveObjectInfo; } private void ToolTipController_GetActiveObjectInfo(object sender, ToolTipControllerGetActiveObjectInfoEventArgs e) { if(e.SelectedControl is DevExpress.XtraTreeList.TreeList) { TreeList tree = (TreeList)e.SelectedControl; TreeListHitInfo hit = tree.CalcHitInfo(e.ControlMousePosition); if(hit.HitInfoType == HitInfoType.Cell) { object cellInfo = new TreeListCellToolTipInfo(hit.Node, hit.Column, null); string toolTip = string.Format("{0} (Column: {1}, Node ID: {2})", hit.Node[hit.Column], hit.Column.FieldName, hit.Node.Id); e.Info = new DevExpress.Utils.ToolTipControlInfo(cellInfo, toolTip); } } } protected override void OnActivated() { base.OnActivated(); columnChooserControllerBase = Frame.GetController<ColumnChooserControllerBase>(); if(columnChooserControllerBase != null) { columnChooserControllerBase.ColumnChooserExtenderChanged += ColumnChooserControllerBase_ColumnChooserExtenderChanged; } gridEditorColumnChooserController = Frame.GetController<GridEditorColumnChooserController>(); if(gridEditorColumnChooserController != null) { gridEditorColumnChooserController.ColumnChooserExtenderChanged += ColumnChooserControllerBase_ColumnChooserExtenderChanged; } } protected override void OnDeactivated() { if(columnChooserControllerBase != null) { columnChooserControllerBase.ColumnChooserExtenderChanged -= ColumnChooserControllerBase_ColumnChooserExtenderChanged; columnChooserControllerBase = null; } gridEditorColumnChooserController = Frame.GetController<GridEditorColumnChooserController>(); if(gridEditorColumnChooserController != null) { gridEditorColumnChooserController.ColumnChooserExtenderChanged -= ColumnChooserControllerBase_ColumnChooserExtenderChanged; gridEditorColumnChooserController = null; } base.OnDeactivated(); } }

        See the attached project for a complete solution.
        This change will be included into the next minor update for v16.1, v16.2 and v17.1 releases.
        See also:
        How to customize the ToolTip for a TreeList cell
        Customize Controllers and Actions

          Show previous comments (1)
          DevExpress Support Team 8 years ago

            We have published a daily build containing this functionality. You can download it from the link below:
            DevExpressNETComponents-17.1.4.17185.exe / DevExpressComponents-16.2.8.17185.exe

            MF MF
            Michael Folinsbee 7 years ago

              To confirm, with XAF 18.1.3, tooltips now appear in the model browser using the above controller. This is very helpful for our users. Thanks again.

              Dennis Garavsky (DevExpress) 7 years ago

                Great! Thanks for informing us of your results, Michael.

                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.