Declined
Last Updated: 05 Feb 2024 07:24 by ADMIN
Dominik
Created on: 29 Jan 2024 12:43
Category: UI for WinForms
Type: Bug Report
0
RadForm subcontrols not responing after docking to RadDock

Hello support,

here is what happend:

I created a RadFrom with controlls on it.

Then i add it to my RadDock like this:


private void Add_RadForm_asDocument_ToRadDock(RadDock rd, HostWindow hw, object radform, string title)
{
    bool found = false;

    foreach (var item in radDock_main_notr.DockWindows)
    {
        if (item.GetType() == typeof(HostWindow))
        {
            if (((HostWindow)item).Name == radform.GetType().Name + "1")
            {
                found = true;
                hw = (HostWindow)item;
            }
        }
    }

    if (found == false && radform != null)
    {
        if (hw == null || hw.Text == "")
        {
            hw = rd.DockControl((System.Windows.Forms.Control)radform, DockPosition.Fill, DockType.Document);
        }
    }

    hw.Text = title;
    hw.CloseAction = DockWindowCloseAction.Close;
    hw.ToolCaptionButtons = ToolStripCaptionButtons.None;
    hw.Select();
}

The RadFrom is added to the RadDock:

Settings is the new RadFrom thats now docked.
But when i try to use the RadDropDownList then its "stucks" (also the other GUI controls):

The  changed selection of the RadDropDownList will not change.
When i close the RadForm via the "x" and eropen it again it works.

 

 

4 comments
ADMIN
Nadya | Tech Support Engineer
Posted on: 05 Feb 2024 07:24

Hello, Dominik,

Thank you for the provided information so far. I have reviewed the provided code snippet in the Add_RadForm_asDocument_ToRadDock method that you provided and it seems ok to me. I have also tested it in my sample project and the RadForm is correctly added to the dock. If I understand you correctly, you expect RadForm to be shown when make a selection through the RadDropDownList. However, I am not familir with the exact logic that you have behind clicking on the drop-down items.

Reading your latest post, it seems that you managed to find the solution for not showing RadFom's controls. Note, once the RadForm is added to the dock by using a HostWindow you should manage its visual appearance like showing/hiding/dock/undock, esp. especially if you want to do this on a button click or menu item click. The RadFrom should somehow be notified about the behavior that you would like to obtain. According to the provided code snippet in your last reply, it seems that you show the form upon clicking on a menu item and this is working fine. 

Hence, I will change the status of this bug report to Declined since it seems there is not an issue in RadDock control itself. 

I hope this information helps. If you have any other questions do not hesitate to write back.

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Dominik
Posted on: 02 Feb 2024 10:57

I solved it:

       private void RadMenuItem_settings_Click(object sender, EventArgs e)
       {
           TranslationHelperBase.TranslateFormControls(f_settings, F_Main_notr.settings.DefaultProgramLanguage);
           Observers.ObserverSettings.Notify(nameof(Observers.ObserverSettings), "loadsettings");
           Data.DataHandlerClass.TelerikHandler.Add_RadForm_asDocument_ToRadDock(radDock_main_notr, hw_settings, f_settings, Translation.Translation.GetTranslation(nameof(StaticMessages.ApplicationTexts.TitleSettings), F_Main_notr.settings.DefaultProgramLanguage));
     f_settings.Show();
       }

I needed to add ".Show()" then the behavior is fine.

     
Dominik
Posted on: 01 Feb 2024 14:50
Updated to 2024.Q1 release but this error is still existent.
Dominik
Posted on: 30 Jan 2024 09:05
Additional information:
i also tested it with different themes. in all themes it behaves the same.