[futurebasic] Re: [FB] Roomy Edit Fields

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2008 : Group Archive : Group : All Groups

From: Brian Stevens <bstevens33@...>
Date: Mon, 10 Mar 2008 07:46:49 -0700
On Mar 10, 2008, at 3:32 AM, Eugen Rosu wrote:

> How can I put more then 32 767 characters of text in an Edit Field ?


One option is to use control-based edit fields and switch to modern  
EditUnicodeTextControls ( EUTCs )
'-------------------
include "Tlbx CarbonEvents.incl"

local fn BuildEUTCWnd
'~'1
dim as Str255                 s
dim as ControlFontStyleRec    tfs
dim as Rect                   r
dim as WindowAttributes       wa

wa = _kWindowCloseBoxAttribute¬
      _kWindowCollapseBoxAttribute¬
      _kWindowFullZoomAttribute¬
      _kWindowResizableAttribute¬
      _kWindowStandardHandlerAttribute

SetRect( r, 0, 0, 395, 219 )
appearance window -1, "EUTC", @r, _kDocumentWindowClass, wa
def SetWindowBackground( _kThemeActiveDialogBackgroundBrush, _zTrue )


SetRect( r, 98, 58, 304, 159 )
appearance button 1,,,,,, @r, _kControlEditUnicodeTextProc
def SetButtonTextString( 1, "Will hold more than 32k of text" )

appearance window 1
end fn


fn BuildEUTCWnd


do
HandleEvents
until gFBQuit
'----------------
Brian S.