[CLOSED] Change width Confirmation

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Change width Confirmation

    Hi,

    I'm using a confirmation like this:

                                <ext:button id="btnAdd" runat="server" text="Nieuwe bestuurder" icon="Add">
                                    <directevents>
                                        <click onevent="newDriverClick">
                                            <confirmation confirmrequest="true" title="Toevoegen bestuurder" message="Weet u het zeker? De huidige bestuurder zal worden overschreven!" />
                                        </click>
                                    </directevents>
                                </ext:button>
    But since the 'parent' window is quite small, the box is to large horizontally. Any idea how to fix ?
    See attached screenshot

    Martin
    Attached Thumbnails Click image for larger version. 

Name:	Confirmation.jpg 
Views:	87 
Size:	99.6 KB 
ID:	2829  
    Last edited by Daniil; Jun 07, 2011 at 2:22 PM. Reason: [CLOSED]
  2. #2
    Hi,
    Try to add "<br/>" tags for string splitting
  3. #3
    Too easy :)

    Still ... a width property wouldn't be bad at all. Now I have trail and error the place where to put my "<br/>"

    Martin
  4. #4
    Hi,

    I can suggest to use BeforeConfirm to manage of message box size.

    Something like this:

    Example
    <Confirmation 
        ConfirmRequest="true" 
        Message="too long text"
        BeforeConfirm="onBeforeConfirm()" />
    and
    var onBeforeConfirm = function () {
        var dialog = Ext.Msg.getDialog();
        dialog.on(
            "beforeShow", 
            function () {
                this.setWidth(parentAutoLoadControl.getWidth() * 0.8);
            },
            dialog,
            {
                single : true
            }
        );
    }
  5. #5
    Quote Originally Posted by Daniil View Post
    Hi,

    I can suggest to use BeforeConfirm to manage of message box size.

    Something like this:

    Example
    <Confirmation 
        ConfirmRequest="true" 
        Message="too long text"
        BeforeConfirm="onBeforeConfirm()" />
    and
    var onBeforeConfirm = function () {
        var dialog = Ext.Msg.getDialog();
        dialog.on(
            "beforeShow", 
            function () {
                this.setWidth(parentAutoLoadControl.getWidth() * 0.8);
            },
            dialog,
            {
                single : true
            }
        );
    }
    Great !

    The only thing missing is that the messagebox is not in the center anymore. Any idea ?

    Martin
  6. #6
    Try to call .center() within 'show' listener.
  7. #7
    Quote Originally Posted by Daniil View Post
    Try to call .center() within 'show' listener.
    Sorry Daniil..probably a stupid question. But a show listener of the confirmation box ? Where can i find that ? :S
  8. #8
    The same as with "beforeshow" event.
    dialog.on("show", ...);
  9. #9
    Quote Originally Posted by Daniil View Post
    The same as with "beforeshow" event.
    dialog.on("show", ...);
    Ah..ok. I was right then, but this.center() isn't working:

        <script type="text/javascript">
            var onBeforeConfirm = function() {
                var dialog = Ext.Msg.getDialog();
                dialog.on("beforeShow",
                    function() {
                        this.setWidth(parentAutoLoadControl.getWidth() * 0.8);
                    },
                    dialog,
                    {
                        single: true
                    }
                 );
                 dialog.on("show",this.center());
            }
        </script>

    ERROR: Microsoft JScript runtime error: Object doesn't support property or method 'center'

    Martin
  10. #10
    The second parameter must be a function.
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] how to change the grid column width in client side?
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 07, 2012, 7:36 PM
  2. [CLOSED] combobox change confirmation
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 06, 2012, 6:41 AM
  3. [CLOSED] Change Width of MessageBox on Client
    By logicspeak in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 08, 2012, 6:13 PM
  4. [CLOSED] [1.0] CheckColumn width change broken
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 15, 2010, 12:58 PM
  5. [CLOSED] [1.0] Best way to change window width (client)
    By CarWise in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 17, 2010, 5:42 PM

Tags for this Thread

Posting Permissions