FONT clauses as codeblocks

This forum is for eXpress++ general support.
Post Reply
Message
Author
reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

FONT clauses as codeblocks

#1 Post by reganc »

Roger

We noticed yesterday that the FONT clause of DCSAY when using a codeblock to return a font name does not seem to be working.

The documentation says that it should be possible.

Is it just a problem with Express++ build 255 that we are using?

Thanks
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: FONT clauses as codeblocks

#2 Post by Tom »

This seems to be true also for build 258. Fonts don't change:

Code: Select all

lTest := .T.
@ 1,1 DCSAY 'TEST' FONT {||IF(lTest,"10.Tahoma","12.Arial")} SIZE 10,1 OBJECT oTest
@ 2,1 DCPUSHBUTTON CAPTION 'Test' SIZE 10,1 ACTION {||lTest := !lTest,DC_GetRefresh(oTest)}
DCREAD GUI FIT
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: FONT clauses as codeblocks

#3 Post by rdonnay »

It appears that I never implemented that feature.
It was an easy fix.
Copy the attached _DCCLASS.PRG to \exp19\source\dclipx and run build19_sl1.bat to rebuild DCLIPX.DLL.

This fix will be in build 258.

Here's a test program for you:

Code: Select all

#INCLUDE "dcdialog.ch"

FUNCTION Main()

LOCAL GetList[0], nPointer := 1, aFonts, oSay

aFonts := { ;
   '10.Arial Bold', ;
   '11.Arial Bold', ;
   '12.Arial Bold', ;
   '13.Arial Bold', ;
   '14.Arial Bold', ;
   '15.Arial Bold', ;
   '16.Arial Bold', ;
   '17.Arial Bold', ;
   '18.Arial Bold', ;
   '19.Arial Bold', ;
   '20.Arial Bold' }

@ 0,0 DCSAY {||'This is ' + aFonts[nPointer]} SAYSIZE 50,2 FONT {||aFonts[nPointer]} ;
             OBJECT oSay

@ 3,0 DCPUSHBUTTON CAPTION 'Change Font' SIZE 20,2 FONT '10.Arial Bold' ;
      ACTION {||nPointer++, IIF(nPointer>Len(aFonts),nPointer:=1,nil), ;
                DC_GetRefresh(GetList)}

DCREAD GUI FIT TITLE 'Font test'

RETURN nil

* -------

PROC appsys ; return
Attachments
_dcclass.zip
(39.24 KiB) Downloaded 670 times
The eXpress train is coming - and it has more cars.

Post Reply