RE: Who can write an inputbox.e?

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

Liu Junfeng wrote:
> ft,The error occured again.
> 
> -- 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=
>>createEx(Window,"",0,(ScreenSize[1]-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