+1-888-365-2779
Try Now
More in this section

Forums / Designing & Styling / User Control Designer Size

User Control Designer Size

4 posts, 0 answered
  1. Nikodem
    Nikodem avatar
    5 posts
    Registered:
    18 May 2011
    09 Jun 2011
    Link to this post
    Hi,

    I searched for a solution to change the DesignerBox for a control, but nothing works.
    "dialogBase.resizeToContent();" doesn't do anything no matter where i put that..
    Even if i call it on the ascx page at the bottom.

    So how do i change the size of the Box like it does when editing an image or a text?

    Greetings
    Niko
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    13 Jun 2011
    Link to this post
    Hi Nikodem,

    If you use Telerik.Sitefinity.Web.UI.AjaxDialogBase as a basis you should be able to call

    this.resizeToContent();

    or dialogBase.resizeToContent(); if you use Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase as a base.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Philip
    Philip avatar
    1 posts
    Registered:
    24 Jul 2011
    21 Sep 2011
    Link to this post
    I have a similar problem on my CustomSettingsDesignerView dialog based on the products module - it works perfectly except for the  same issue of resizing i have tried both dialogBase.resizeToContent(); as shown below and this.resizeToContent(); - nither works - do i have it in the correct place ?

    refreshUI: function () {
           this._refreshing = true;
           var control = this.get_controlData();
           var field = $find(this._numberOfTestimonialsDisplayedControlId);
           field.set_value(control.NumberOfTestimonialsDisplayed);
     
           var zonefield = $find(this._zonesSelectedControlId);
     
           var taxonArray = control.SelectedZones.split(",");
     
     
           var selectedTaxaCount = taxonArray.length;
           zonefield.loadTaxa(taxonArray);
           var _selectedTaxaIndex = taxonArray.length - 1;
           while (selectedTaxaCount--) {
     
               var Taxon = zonefield._getTaxon(taxonArray[_selectedTaxaIndex])
     
               zonefield.addTaxon(Taxon);
               _selectedTaxaIndex--;
     
           }
     
           this._refreshing = false;
           dialogBase.resizeToContent();
     
       },
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    21 Sep 2011
    Link to this post
    Hi Philip,

    If your client component is based on Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase, inside PropertyGrid and its pageLoaded we call dialogBase.resizeToContent(); which overrides the settings that resize the window.You need to create or disable /override the pageLoaded. The PropertyGrid is not accessed directly. The property grid is wrapped inside ControlDesignerBase and send to the client component. There does not seem to be a straight way to access the load of the PropertyGrid. You will need a class that inherits from PropertyGrid, then wrap your custom PropertyGrid in a custom ControlDesignerBase class and finally use the custom ControlDesigner base component on the client. This seems to be an usability issue and the solution looks quite complex for this change

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered