View Single Post
  #5  
Old 12-09-2012, 12:17 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
You could probably do this, I commented the changes.

PHP Code:
function AskQuestion(titlequestion) {
  
this.ans false;
  
  new 
GuiWindowCtrl("QUESTION_WINDOW") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "222,99";

    
canclose false;
    
canmaximize false;
    
canminimize false;
    
canmove true;
    
canresize true;
    
closequery false;
    
destroyonhide false;
    
    
// added visible = true so it shows for new messages
    
visible true;
    
text title;
    
1093;
    
646;

    new 
GuiButtonCtrl("QUESTION_YES") {
      
profile GuiBlueButtonProfile;
      
text "Yes";
      
width 116;
      
69;
      
      
// catch the buttonclick event and send it to onButtonClick
      
thiso.catchEvent(this"onAction""onButtonClick");
    }
    new 
GuiButtonCtrl("QUESTION_NO") {
      
profile GuiBlueButtonProfile;
      
text "No";
      
width 107;
      
115;
      
69;
      
      
// catching the buttonclick event and send it to onButtonClick
      
thiso.catchEvent(this"onAction""onButtonClick");
    }
    new 
GuiScrollCtrl("QUESTION_SCROLL") {
      
profile GuiBlueScrollProfile;
      
height 68;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 225;

      new 
GuiMLTextCtrl("QUESTION_MULTILINE") {
        
profile GuiBlueMLTextProfile;
        
height 34;
        
horizsizing "width";
        
text question;
        
width 200;
      }
    }
  }
  
  
// wait until the window is hidden 
  
waitfor(QUESTION_WINDOW"onHide");

  return 
this.ans;
}

function 
onButtonClick(obj) {
  
this.ans obj.text != "No";
  
QUESTION_WINDOW.hide();

Seems like déj* vu.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote