[futurebasic] Re: [FB] Pasting to an Edit field

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Brian Stevens <brilor@...>
Date: Mon, 31 May 2004 14:12:47 -0700
On May 31, 2004, at 12:10 PM, michael evans wrote:

> Ok, so what am I doing wrong in the following short example?

Letting  FB handle the edit menu seems to help. I RAN and then pasted 
at the end of the text in the edit field. See screen shot of results. 
Typing directly into the field works too.


clear local
local fn buildMainWnd
dim WndRect as rect

SETRECT(WndRect, 0, 0, 762, 684)
APPEARANCE WINDOW 1, "Main", @WndRect,¬
_kDocumentWindowClass,_kWindowStandardFloatingAttributes
DEF SETWINDOWBACKGROUND(_kThemeActiveDialogBackgroundBrush,_zTrue)

text _geneva, 9, 0

EDIT FIELD 1,"this a test",¬
(74, 202)-(561, 262), _framed_noDrawFocus

end fn
clear local
local Fn HandleDialog
'---> Variables
DIM AS INT DlgEV,DlgID
dim as boolean flag
'---> Get Event Info
DlgEV = DIALOG(0)
DlgID = DIALOG(DlgEV)
SELECT DlgEV
CASE _preview
SELECT DlgID
case _efChanged
long if WINDOW(_activeWnd) = 1
long if WINDOW(_efNum) = 1
EDIT TEXT #1,_times,12,_boldbit%

end if
end if
end select

end select
end fn

clear local
local Fn HandleMenu



end fn
gFBEditSelectAll = _zTrue
edit menu 2

on dialog Fn HandleDialog
on menu   fn HandleMenu

fn buildMainWnd

DO
HANDLEEVENTS
UNTIL gFBQuit
END