This is a migrated thread and some comments may be shown as answers.
Overide Default dialog settings
3 Answers 51 Views
This is a migrated thread and some comments may be shown as answers.
Joseph Roberts
Top achievements
Rank 1
Joseph Roberts asked on 21 Jul 2011, 12:56 PM
Is there a way to override default dialog settings, like the crop's height and width, so that I can force a particular height and width from the start?

Thanks,
Joe

3 Answers, 1 is accepted

Sort by
0
Kevin Donahue
Top achievements
Rank 1
answered on 22 Jul 2011, 07:26 AM
I would like this as well. 

From playing around, I sort of made it work from a separate button.  I launch the Crop dialog when the window loads, however the _currentToolWidget is null right after I run executeCommand.  It must take some time to load, because when I access that property later, after a button is clicked, it now has a value.  Using this widget object, you can change the width and height used for cropping.  You must be able to do this all in one action, maybe using timers?  It would be nice if there was a WidgetLoaded event. Anyway, hope this gets you in the right direction:

var g_strEditor = 'RadImageEditor1';

function pageLoad(sender, eventArgs) {
    var objIE = $find(g_strEditor);
    objIE.executeCommand('Crop');
}

function ButtonClick() {
  //Need the widget to be loaded before we can access it and change the crop settings
    var objIE = $find(g_strEditor);
    var objWid = objIE._currentToolWidget;
    objWid._constraintBtn.set_checked(false);
    objWid.set_height(100);
    objWid.set_width(300);
}
0
Accepted
Rumen
Telerik team
answered on 22 Jul 2011, 11:21 AM
Hi,

The requested customization is currently not supported. We will try to provide it for the next Q2 2011 SP1 release. Here you can find the PITS Issue that I created for your feature request: Public URL.

All the best,
Rumen
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Joseph Roberts
Top achievements
Rank 1
answered on 22 Jul 2011, 12:24 PM
Great.  Thanks.
Asked by
Joseph Roberts
Top achievements
Rank 1
Answers by
Kevin Donahue
Top achievements
Rank 1
Rumen
Telerik team
Joseph Roberts
Top achievements
Rank 1
Share this question
or