[futurebasic] Re: [FB] Link-like Appearance Button

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

From: tedd <tedd@...>
Date: Tue, 22 Jun 2004 09:36:06 -0400
>>Sorry for the confusion.
>
>tedd,
>
>Your question seems both clear and reasonable. 
>Sorry if I read (and responded) carelessly. My 
>guess is that an approach like Jonathan's is as 
>close as we're likely to get, at least for now.
>
>  e-e
>  =J= a  y

=J= a  y

No apology needed -- I just didn't want to sound 
like an idiot in not knowing how a control 
worked, which apparently several people thought 
by their comments to me both public and private.

I must have said something wrong.

To recap, what I wanted was a text-link-like 
button and it was actually much simpler than 
jonathan's approach. Simply  create an edit field 
with underlined text and detect it via _efClick 
-- like the code at the end of this email.

I just wanted to create a similar appearance button.

tedd

--- code follows

'~'1

local fn BuildWindow
dim as rect     r

setrect( r, 0, 0, 200, 200)
appearance window -1, "Click this TEXT",¬
                                        @r,¬
                     _kDocumentWindowClass,¬
                  _kWindowCloseBoxAttribute

color = _zBlue
text _geneva, 10, _ulineBit%
setrect( r, 70, 20, 130, 35)
edit field 1, "Name",@r,_noFramedNoCR_noDrawFocus,_centerJust
edit field 0

window 1

end fn

'~'1

local fn DoDialog
dim as long evnt, id

evnt = dialog(0)
id = dialog(evnt)

select case( evnt )
case _wndClose
select( id )
case 1 :  gFBQuit = _zTrue
end select
case _efClick
select( id )
case 1
beep
edit field 0
end select
end select

end fn

'~'1

on dialog fn DoDialog

fn BuildWindow

do
handleevents
until gFBQuit
end




tedd
--
--------------------------------------------------------------------------------
http://sperling.com/