[futurebasic] Re: [FB] Embedding Edit Fields?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2003 : Group Archive : Group : All Groups

From: Ian Mann <i.mann@...>
Date: Tue, 11 Feb 2003 07:52:30 +0000
On Monday, February 10, 2003, at 07:47  pm, mckernon wrote:

> Once again, I venture into the unknown...
> I would like to be able to use edit fields inside the area enclosed by 
> a
> kControlGroupBoxSecondaryTextTitleProc control. However, the only way I
> can see to make edit fields (plain, unstyled is fine) is with EDIT
> FIELD..., and DEF EMBEDBUTTON evidently can't embed those kinds edit
> fields (I get a runtime error).
> In any event, edit fields won't take mouse clicks, keypresses, or
> anything when they occupy space within the GroupBox's rectangle, so
> clearly they need to be embedded to work.
> The ADC web site has precious little to say, although it does mention
> that text input fields are a kind of control. But there's nothing I can
> find about how to build an Appearance-compliant edit field.
> Anybody else been through this?
> If this isn't possible, I'll just redesign the window...:(
> Thanks --
> - John

Hi John,

Yes I have been through this, and RP was kind enough to supply the code 
below :

local mode
dim efPaneControlRef as handle
dim err              as OSErr
local fn EmbedEFinButton(  efNum as long, btnNum as long )
efPaneControlRef = fn FBFindEF( efNum, _allEFSubClasses, 0 )
err = fn EmbedControl( efPaneControlRef, button&( btnNum ) )
if err then stop "EmbedEFinButton error " + str$( err )
end fn

Best Regards