Request for addition to dcpushbuttonxp

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Request for addition to dcpushbuttonxp

#1 Post 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++?
Best regards,

Chris.
www.aboservice.be

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

Re: Request for addition to dcpushbuttonxp

#2 Post 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
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Request for addition to dcpushbuttonxp

#3 Post 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.
Best regards,

Chris.
www.aboservice.be

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

Re: Request for addition to dcpushbuttonxp

#4 Post by rdonnay »

I'm still confused. Can you show me (visually) what this button looks like?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Request for addition to dcpushbuttonxp

#5 Post by skiman »

Hi Roger,

The button looks as below. The same can be achieved by a captionarray.
Attachments
buttonsample.jpg
buttonsample.jpg (5.08 KiB) Viewed 5413 times
Best regards,

Chris.
www.aboservice.be

Post Reply