DCPUSHBUTTONXP, build 255

This forum is for general support of Xbase++
Post Reply
Message
Author
User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

DCPUSHBUTTONXP, build 255

#1 Post by Tom »

Hi, Roger.

If the pushbutton image is an icon object, DC_XbpPushButtonXP:Draw() runs into an error here (around line 1135):

Code: Select all

  ELSEIF Valtype( cCaption ) == 'O' .AND. (cCaption:isDerivedFrom('XbpBitMap') .OR. cCaption:isDerivedFrom('XbpIcon'))
    oBitmap := cCaption
    aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
    aTarget := { nStartCol, nStartRow, nEndCol, nEndRow }
    oBitmap:draw( oPS, aTarget, aSource, ;
            IIF(lDisabled .AND. ::disabledBmp,GRA_BLT_ROP_PATCOPY,nil), GRA_BLT_BBO_IGNORE )   // abo service
The method "draw" has different parameters for icons. It should be this way:

Code: Select all

ELSEIF Valtype( cCaption ) == 'O' .AND. (cCaption:isDerivedFrom('XbpBitMap') .OR. cCaption:isDerivedFrom('XbpIcon'))
    oBitmap := cCaption
    aSource := {0,0,oBitmap:xSize,oBitmap:ySize}
    aTarget := { nStartCol, nStartRow, nEndCol, nEndRow }
    IF cCaption:isDerivedFrom('XbpIcon') // new
      oBitmap:draw( oPS, aTarget,IIF(lDisabled .AND. ::disabledBmp,XBP_STATE_DISABLED,XBP_STATE_NORMAL) )
      ELSE
      oBitmap:draw( oPS, aTarget, aSource, ;
            IIF(lDisabled .AND. ::disabledBmp,GRA_BLT_ROP_PATCOPY,nil), GRA_BLT_BBO_IGNORE )   // abo service
    ENDIF
Anyway, there seem to be some other cosmetic problems; I'm currently investigating this.

1. If a button has an image and a text caption, the text caption is one pixel higher as it should be.
2. Tooltips and hotkeys seem not to work with the BUTTONS clause of DCGET OPTIONS (items 9 and 10 of the buttons array).
Best regards,
Tom

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

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

Re: DCPUSHBUTTONXP, build 255

#2 Post by Tom »

Damned. Wrong forum. Message belongs to "eXpress++ support". Sorry.
Best regards,
Tom

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

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

Re: DCPUSHBUTTONXP, build 255

#3 Post by rdonnay »

Tom -

This is good timing.
I'm trying to get out a new release this week.
I have samples that use icons with no problem.
Can you reproduce this in a sample?

Roger
The eXpress train is coming - and it has more cars.

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

Re: DCPUSHBUTTONXP, build 255

#4 Post by Tom »

Hi, Roger.
Can you reproduce this in a sample?
What parts? The XbpIcon:Draw-problem (see code) is an error; XbpIcon:Draw() has different parameters to XbpBitmap:Draw().

I'm trying to show the one-pixel-problem in a sample (and/or find the reason). Tooltips and accelerator keys with DCGETOPTIONS ... BUTTONS simply don't work.

Could you please move the thread to "eXpress++ support"?
Best regards,
Tom

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

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

Re: DCPUSHBUTTONXP, build 255

#5 Post by rdonnay »

You are right!! I was looking at my build 256 code.
I fixed this problem and forgot about it.
The eXpress train is coming - and it has more cars.

Post Reply