Win32lib Beginners Corner ???

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

-- L_entry.exw  -- a scrollable sle with a size limit.
include win32lib.ew

global constant
  MyWin  = create(Window,"..enter a phrase up to 55 char..",
                  0,0,0,460,75,#CC0000), -- nothing but [x]
  Label1 = create(RText,"..then hit ENTER:",MyWin,5,5,110,20,0),
  Sle1   = create(EditText,"",MyWin,115,3,100,20,#80), -- ES_AUTOHSCROLL.
  Label2 = create(LText,"",MyWin,5,25,450,20,0)

global procedure onOpen_MyWin()
  integer i
  i=sendMessage(Sle1,#C5,55,0) -- max 55 char. using EM_LIMITTEXT(#C5).
end procedure

global procedure onKey_Sle1(integer key)
  if key=13 then setText(Label2,getText(Sle1)) end if
end procedure

onOpen[MyWin] = routine_id("onOpen_MyWin")
onKeyPress[Sle1] = routine_id("onKey_Sle1")

WinMain(MyWin)
-- end --

http://www.king.igs.net/~wolfritz     ...www.king.igs.net/~wolfritz/tutor.htm

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

Search



Quick Links

User menu

Not signed in.

Misc Menu