[futurebasic] Re: [FB] Static edit field problem

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

From: Douglas Stemen <dstemen@...>
Date: Thu, 23 May 2002 07:24:24 -0400
The following example code demonstrates the bug with static edit fields that
I am experiencing in my accounting program.

In this example, a regular edit field can be made static and then return to
non-static. 

A static edit field cannot be made non-static.

When the radio button is pressed please notice that the frames do not change
to be consistent with static and non-static edit fields.

This process works perfect in non-appearance applications even without
having to place an EDIT FIELD 0 before each edit field changed (it only
needs to be before the first in the group changed).

Total erasing and recreating these edit fields is not a good alternative to
the problem.

Any help is appreciated.

LOCAL FN doDialog
DIM AS LONG evnt
evnt = DIALOG(0)
SELECT CASE( evnt)
CASE _btnClick
if button(3)=_markedBtn then button 3,_activeBtn else button 3,_markedBtn
edit field 0
long if button(3)=_markedBtn
edit field 0
edit field 1,"static",,_statFramed,_leftJust
edit field 0
edit field 2,"",,_framedNoCR,_leftJust
edit field 2
xelse
edit field 0
edit field 1,"",,_framedNoCR,_leftJust
edit field 0
edit field 2,"static",,_statFramed,_leftJust
edit field 1
end if
END SELECT
END FN

appearance WINDOW 1,"test
EF",(0,40)-(500,200),_kDocumentWindowClass,,_noAutoFocus_updateVisRgn
edit field 1,"",(10,10)-(100,25),_framedNoCR,_leftJust
edit field 2,"static",(120,10)-(220,25),_statFramed,_leftJust
BUTTON 3,_activeBtn,"1 is static",(10,50)-(120,70),_radio
EDIT FIELD 1

ON DIALOG FN doDialog
DO
HANDLEEVENTS
UNTIL gFBQuit
END