Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Urs Eggmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Trouble with Fixedtext on top of a bitmap Date: Fri, 3 Jan 2014 20:54:26 +0100 Lines: 141 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0011_01CF08C6.03F09900" X-Trace: individual.net LGuIJjYF1xSEGKdtxbsm9w0HzeRvDsYJCLMwBbAGvp+3Xf0yCz Cancel-Lock: sha1:ZpoMxPc83ExQteOnAOTnZV0dDs4= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.clipper.visual-objects:6455 This is a multi-part message in MIME format. ------=_NextPart_000_0011_01CF08C6.03F09900 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit Hi Fabio, Have a look to the new code: The FixedText is created by a method "pbCreateAtRuntime", I call with the appropriate button on my window. Then I can change the caption with no problem, as long I do not create the control again. Then I get the effect of more than one visivle Caption. let's say more than one visible control. Is somewhere in your code a multiple creation of the control? Code of the new module in the attached file Regards ans also my best wishes for 2014 Urs "Fabio Romling Rotheia" schrieb im Newsbeitrag news:bc0c34cf-1e93-4d1c-9f7d-176f69be343d@googlegroups.com... Hello Urs, Happy 2014! I saw your code and that's not what i'm looking for. Over there you have 2 Fixed Texts, hide one and show the other. In my code, I create the Fixed Texts at runtime and the problem arises when i change the caption. I cannot hide, because it's the same FT, stored on an array. Thanks a lot, anyway! Best regards, Fábio. Em quarta-feira, 1 de janeiro de 2014 19h04min56s UTC-2, Urs Eggmann escreveu: > Hello Fabio, > > > > Go to www.voug-bodensee.net/Zip-Download/Test.zip , there you will find a > > sample that works here. > > > > Good luck! > > Urs > ------=_NextPart_000_0011_01CF08C6.03F09900 Content-Type: application/octet-stream; name="runtime.prg" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="runtime.prg" METHOD test10 CLASS AppShell LOCAL oWin AS dtaTest10 oWin :=3D dtaTest10{SELF} oWin:Show(showcentered) RETURN NIL CLASS dtaTest10 INHERIT dtaTest10_vo=20 PROTECT LonTop AS LOGIC=20 PROTECT txtOnTheFly AS FixedText=20 PROTECT txtAtRunTime AS FixedText=20 METHOD Init(oWindow,iCtlID,oServer,uExtra) CLASS dtaTest10 SUPER:Init(oWindow,ResourceID{"dtaTest10_vo",_GetInst()},iCtlID)=20 SELF:oDCtxtTop:Show() * SELF:oDCtxtBoth:BackGround :=3D Brush{BRUSHHOLLOW} // not = necessary, set Style in the painter to transparent SELF:oDCtxtBoth:Caption :=3D "In the Back"=20 SELF:oDCtxtBack:Hide()=20 SELF:oDCtxtTop:Hide()=20 =20 SELF:txtOnTheFly :=3D FixedText{SELF , 99 , Point{ 100, 300 } , = Dimension{150 , 20 } , "Caption at Init" , FALSE} SELF:txtOnTheFly:Background :=3D Brush{BRUSHHOLLOW}=20 SELF:txtOnTheFly:Show() RETURN SELF METHOD pbSchliessen( ) CLASS dtaTest10 SELF:EndWindow() RETURN NIL METHOD pbChange() CLASS dtaTest10 IF SELF:LonTop =3D=3D TRUE SELF:LonTop :=3D FALSE SELF:oDCtxtBack:Show() SELF:oDCtxtTop:Hide() SELF:oDCtxtBoth:Caption :=3D "In the Back" SELF:txtOnTheFly:Caption :=3D "Caption changed" SELF:txtAtRunTime:Caption :=3D "Crea at RT Caption changed" = // New,=20 // IF you call this method without calling pbCreateAtRuntime() = you will get a run time Error=20 // That means, check befor on existence of the control =20 ELSE SELF:LonTop :=3D TRUE SELF:oDCtxtBack:Hide() SELF:oDCtxtTop:Show()=20 SELF:oDCtxtBoth:Caption :=3D "On Top"=20 SELF:txtOnTheFly:Caption :=3D "Caption changed again" SELF:txtAtRunTime:Caption :=3D "Crea at RT Caption changed again" = // New ENDIF RETURN NIL =20 METHOD Expose(oExposeEvent) CLASS dtaTest10 LOCAL oBoundingBox AS BoundingBox oBoundingBox :=3D IIF(oExposeEvent =3D=3D NULL_OBJECT, NULL_OBJECT, = oExposeEvent:ExposedArea) SUPER:Expose(oExposeEvent)=20 ShowBitmap ( SELF:odcBmp1:handle() , WorkDir() + "M=F6ve-kl.bmp", "" = ) //Put your changes here RETURN NIL METHOD pbCreateAtRuntime() CLASS dtaTest10 // New SELF:txtAtRunTime :=3D FixedText{SELF , 999 , Point{ 200, 250 } , = Dimension{200 , 20 } , "Ccontrol Created at runtime" , FALSE}=20 SELF:txtAtRunTime:Background :=3D Brush{BRUSHHOLLOW}=20 SELF:txtAtRunTime:Show() =20 RETURN NIL ------=_NextPart_000_0011_01CF08C6.03F09900--