View Single Post
  #1 (permalink)  
Old 10-08-2009, 09:35 AM
Chewie71 Chewie71 is offline
Trained Alumni
 
Posts: 342
Default [SOLVED] Creating Multiple Buttons?

Hi,

I need to have this Zimlet have three buttons with three different actions. Right now this code just shows an OK button with a label of "Close", and when you click it the popup closes.

Code:
dlg.getButton(DwtDialog.OK_BUTTON).setText("Close");
    dlg.setButtonVisible(DwtDialog.CANCEL_BUTTON, false);
    // dlg.setButtonListener block is optional; you can use it to augment the default OK button handler 
    // (popdown, dispose) to do interesting things like set a flag somewhere that the user has been notified, etc. 
    // As it is below, it duplicates the default OK button handler.
    dlg.setButtonListener(DwtDialog.OK_BUTTON, new AjxListener(this, function() {
        dlg.popdown();
        dlg.dispose();
    }));
I need to have three buttons. One called "More Info" that opens a webpage, one called "Change Password" that opens a second webpage, and the third as it is now, just a button labeled "Close" that closes the dialog.

Thanks,
Matt
Reply With Quote