FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Error FiveWin/3 Cannot create Dialog Box:
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Error FiveWin/3 Cannot create Dialog Box:
Posted: Tue Jun 30, 2015 07:38 PM
Saludos Cordiales
Antonio,
Colegas
Cual es la capacidad maxima de un campo texto en un DIALOG

Code (fw): Select all Collapse
PROCE MAIN(cMemo,cTitle,nWidth,nHeight)
   LOCAL oDlgF,oMemo,oFontB,I
   LOCAL oBtn

   DEFAULT cMemo  :="",;
           nWidth :=410,;
           nHeight:=200

   cTitle:="Mensaje"

   cMemo:=ALLTRIM(cMemo)
//   cMemo:=LEFT(cMemo,4096) // Si remuevo este comentario genera incidencia, deseo limitar el contenido.

   DEFINE FONT oFontB NAME "Arial"   SIZE 0, -12 BOLD
   
   DEFINE DIALOG oDlgF;
          TITLE cTitle;
          PIXEL OF oDp:oFrameDP;
          STYLE nOr( DS_SYSMODAL, DS_MODALFRAME );
          COLOR NIL,oDp:nGris SIZE nWidth,nHeight
   @ 0,0 GET oMemo VAR cMemo MULTI READONLY SIZE 330,70 FONT oFontB HSCROLL OF oDlgF

   @ 4,0 BUTTON obtn PROMPT "Ok" ACTION oDlgF:End() SIZE 30,20 OF oDlgF

   ACTIVATE DIALOG oDlgF CENTERED;
            ON INIT (oMemo:SetColor(NIL,16773862),;
                     oBtn:Move(nHeight-60,nWidth-80,60,23),;
                     oMemo:Move(0,0,nWidth-0,nHeight-(70),.T.),;
                     DPFOCUS(oBtn),;
                     .F.)



RETURN .T.
// EOF
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Wed Jul 01, 2015 02:11 AM

Juan

has probado usar el metodo LimitText(nChar) ?

Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Wed Jul 01, 2015 03:48 AM

Daniel
Gracias, encontre

METHOD LimitText() INLINE ::SendMsg( EM_EXLIMITTEXT, 0, ::nSize )
en trichedi.prg

Lo aplicare en la clase tget

Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: Error FiveWin/3 Cannot create Dialog Box:
Posted: Wed Jul 01, 2015 03:32 PM
Code (fw): Select all Collapse
   cText := ALLTRIM(cMemo)

   cMemo := SUBST( cText, 1, 4096 )


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion