User Control Designer Size

Posted by Community Admin on 05-Aug-2018 14:41

User Control Designer Size

All Replies

Posted by Community Admin on 09-Jun-2011 00:00

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

Posted by Community Admin on 13-Jun-2011 00:00

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

Posted by Community Admin on 21-Sep-2011 00:00

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();
 
   ,

Posted by Community Admin on 21-Sep-2011 00:00

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

This thread is closed