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

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

From: Robert Covington <artlythere@...>
Date: Mon, 31 May 2004 19:02:11 -0400
On Monday, May 31, 2004, at 06:02  PM, michael evans wrote:

> Brian:
>
> Thanks for thev response. Unfortunately your code does not do what I  
> want.
>
> I'm trying to force any text pasted into an edit field to TEXT  
> _geneva,9,0

Here's a funky observation...

If selecting all the text before pasting, from like 4 characters past  
the end of the text, and dragging back to the starting, the last line  
of the next paste will be Geneva,9 though the other will still be  
unchanged. (for say a 3 line paste)

if you select from the end character on up, the paste is still the  
style of the pasted text. Suggests that a CR is involved somehow there.  
Weird.

rc

>
>
> on 5/31/04 5:12 PM, Brian Stevens at brilor@... wrote:
>
>> 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
>>
>>
>
> Cheers,
>
> ----------------------------------------------------------------------- 
> -----
> Michael Evans
> Chief Technical Officer
> ZUMA Press Inc.
> Voice: (404) 846-9386 * Cell: (404) 229-3930 * Fax: (404) 240-0878
> E-mail: Michael Evans<michael.evans@...>
> ----------------------------------------------------------------------- 
> -----
>
> --
>