Page 1 of 1

Request for addition to dcpushbuttonxp

Posted: Tue Mar 11, 2014 1:03 am
by skiman
Hi,

I was wondering if the following could be added to the dcpushbuttonxp class. I'm testing with a font with icons, and this is working very well. I know there can be a caption array, but this means that I have to change a lot in my code.

If the following could be added to the dcpushbuttonXP class, this would make it a lot easier.

Code: Select all

@ 30,0 DCPUSHBUTTONXP notabstop ;
      SIZE 76, 35 ;
      CAPTION 'F1' ;
      BITMAPFONT 'A' ;
         ALIGN 4 ;
         OFFSET 3 ;
         FONT '12.MyIconFont" ;
      PARENT ... ;
I checked the code, and it looks as this could be done rather easy. Maybe if there is enough interest, it could be added as a standard to eXPress++?

Re: Request for addition to dcpushbuttonxp

Posted: Tue Mar 11, 2014 7:52 am
by rdonnay
Chris -

I'm a bit confused as to what you mean by BITMAPFONT.

Are you saying that a bitmap should be created with tha letter A on it?

Roger

Re: Request for addition to dcpushbuttonxp

Posted: Tue Mar 11, 2014 9:13 am
by skiman
Hi Roger,

I'm creating an icon font, as Wingdings. Instead of bitmaps, I want to use this font. If you use the 'A', the corresponding icon will be used.

In my source code I want to use the same names as now, and with an include file, I will change this to the corresponding letter. But that has nothing to do with the use of the button.
I will have an include file, which will be replacing my current resourceID with the letters I need. This way it will be possible to convert my code to the new button without replacing each button.

Code: Select all

#define ABONEXT   A
#define ABOPREV    B

@ 30,0 DCPUSHBUTTONXP notabstop ;
      SIZE 76, 35 ;
      CAPTION 'F1' ;
      BITMAPFONT ABONEXT ;
         ALIGN 4 ;
         OFFSET 3 ;
         FONT '12.MyIconFont" ;
      PARENT ... ;

@ 30,0 DCPUSHBUTTONXP notabstop ;
      SIZE 76, 35 ;
      CAPTION 'F2' ;
      BITMAPFONT ABOPREV ;
         ALIGN 4 ;
         OFFSET 3 ;
         FONT '12.MyIconFont" ;
      PARENT ... ;

If nobody shows interest, you don't have to spend your time for this. I can also change the class to my specific needs.

Re: Request for addition to dcpushbuttonxp

Posted: Thu Mar 13, 2014 9:02 am
by rdonnay
I'm still confused. Can you show me (visually) what this button looks like?

Re: Request for addition to dcpushbuttonxp

Posted: Fri Mar 14, 2014 4:38 am
by skiman
Hi Roger,

The button looks as below. The same can be achieved by a captionarray.