RE: Who can write an inputbox.e?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Dan Moyer wrote:
> Liu responded:
> 
> > Dan Moyer wrote:
> > > Liu,
> > >
> <snip>
> > > 2.  Your improved inputbox.ew is missing the code doing the creation of
> > > the
> > > inputbox
> <snip>> >
> 
> > That is an unexpected error of IE, not my original code.
> 
> Well, no one can be very surprised by errors in IE!  :)   Can you 
> re-send
> your code for inputbox.ew?
> 
> >
-- inputbox.ew - open an inputbox
-- witten by Liu Junfeng, 2003,Jan
-- If you wish to contact me, send an e-mail to rufi at 163.com

include win32lib.ew
without warning

constant Width=280,Height=120
sequence ScreenSize,Text
ScreenSize = getCtlSize( Screen )
constant inputbox= 
]-Width)/2,(ScreenSize[2]-Height)/2,Width,Height,{WS_CAPTION,WS_BORDER}, 
WS_EX_TOPMOST),
         label   = create(LText,"",inputbox,10,10,200,20,0),
         entry   = create( EditText, "", inputbox, 10, 30, 180, 25, 0 ),
         ok      = create( PushButton, "OK", inputbox, 20, 65, 60, 20, 0 
),
         cancel  = create( PushButton, "Cancel",inputbox, 120, 65, 60, 
20, 0 )
procedure Click_Button(integer self, integer event, sequence parms)
    if self=ok then Text=getText(entry)
    else Text=""  end if
    closeWindow( inputbox )
end procedure
setHandler({ok,cancel}, w32HClick, routine_id( "Click_Button" ))
global function input_box(sequence text,sequence title,integer parent)
       setText(label,text)
       setText(inputbox,title)
       openDialog(inputbox)
return  Text
end function

Euphoria is one of my favorite languages!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu