From: Alexander S.K. <al...@be...> - 2015-07-09 11:54:39
|
Itamar M. Lins Jr. Lins пишет: > #include "hwgui.ch <http://hwgui.ch>" > Function main > LOCAL oDlg, cVar:= space(100) > > INIT DIALOG oDlg clipper title "Obs" AT 0,0 SIZE 800,400 > > @ 10,10 get oVar VAR cVar SIZE 760,300 STYLE ES_MULTILINE + > ES_AUTOVSCROLL + WS_VSCROLL + ES_WANTRETURN > > //Typing abcd...<enter>,abcd...<enter>.... and ESCAPE! > > oDlg:Activate(,,,.T.) > > hwg_msginfo(cVar) //None :( > hwg_msginfo( oVar:GetText(cVar) ) //None :( > hwg_msginfo(oVar:value) //None :( > This isn't a bug. Try this code with Clipper or Harbour for console mode: Function main local cvar := space(12) clear screen @ 2,2 say "input" get cvar read ? "cvar:",cvar ? return nil Input something and press ESC - and you will get an empty string, because when you leave a get object with ESC, it content isn't saved. What about ovar:value, it doesn't work after destroyng the dialog, because all controls are destroyed, too, and it is impossible to extract values from them. So, the only way to get the editbox content in this case is to use oVar:value before the dialog is destroyed - in ON EXIT, for example: INIT DIALOG oDlg clipper title "Obs" AT 0,0 SIZE 800,400 ON EXIT {||hwg_msginfo(ovar:value),.t.} Regards, Alexander. |