Hybrid View

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    eamonnlawlor is on a distinguished road

      0  

    Default Unanswered: MessageBox Alert Min Width not working

    Unanswered: MessageBox Alert Min Width not working


    Hi there,
    I am currently stuck on an issue that I have seen existed in GXT 1.x bugs. There was a workaround for that issue and version, I am now experiencing the same issue in GXT 2.2.4 using GWT 2.4, however the workaround does not help. Currently my code is

    MessageBox box = MessageBox.alert(messageBoxTitle, messageBoxMessage, new Listener<MessageBoxEvent>() {
    public void handleEvent(MessageBoxEvent mbe) {
    Button btn = mbe.getButtonClicked();
    serviceAsync.setAcknowledgementDate(token, new GenericAsyncCallback(){
    public void onError(MessageBoxEvent event) {
    event.getMessageBox().close();
    }
    @Override
    public void onSuccess(Object arg0) {
    redirect(SiteUtil.getInstance().getBaseURL()+ urlPath) ;
    }
    });}});
    box.setMinWidth(500);
    box.setMaxWidth(600);
    box.getDialog().center();

    The previous workaround from GXT 1.x version was to set the width on the dialog rather than the message box and to center the dialog as my code shows above. But both these workarounds do not work nor does setting the min width on the messageBox object itself. I want my message box to contain a long message, so i want the width to be greater than the default. Am I doing something wrong? Any help would be much appreciated.
    Note I have also tried setting the widths before invoking the alert message on message box to no avail either.



  2. #2
    Sencha User
    Join Date
    Nov 2009
    Posts
    51
    Answers
    1
    Vote Rating
    0
    smiletolead is on a distinguished road

      0  

    Default


    Hi
    I find this minWidth working with GXT 2.2.5. Check if you are using Quirks mode. I am using Standard mode, that is, Strict DOCTYPE.

    Ganesh

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    eamonnlawlor is on a distinguished road

      0  

    Default


    Hi Ganesh,
    Thanks for your response.
    We are using transitional DOCTYPE. Is there a workaround for this particular DocType?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

    Regards,
    Eamonn

  4. #4
    Sencha User
    Join Date
    Nov 2009
    Posts
    51
    Answers
    1
    Vote Rating
    0
    smiletolead is on a distinguished road

      0  

    Default


    I am not aware of any!

Thread Participants: 1

Tags for this Thread