Page 1 of 2

Buttonxp and TabPages

Posted: Thu Mar 18, 2010 12:55 pm
by wkedv
Hi Roger,

How i can expand the sample with the Tabpages with other 8 Tabpages, but the 2nd 8 Pages should be in bottom-style.

How can i do this with the dcaddbuttonxp in your sample, that the rounded corner are on bottom of the button.

Thks Kurt

Re: Buttonxp and TabPages

Posted: Thu Mar 18, 2010 9:45 pm
by rdonnay
I modified buttonxp.prg to add bottom tabs.

Here it is.

http://bb.donnay-software.com:8080/support/buttonxp.prg

I also made it look a little better by using DCSTATIC instead of DCTABPAGE.

Re: Buttonxp and TabPages

Posted: Fri Mar 19, 2010 2:05 am
by wkedv
Thanks Roger,

it works fine and look good.

Regards Kurt

Re: Buttonxp and TabPages

Posted: Mon Mar 22, 2010 4:45 pm
by wkedv
Hi Roger,

Did you have a look at my sample i sent you yesterday regarding the extrem flickering?

Please will you be so kind and check this.

Thanks and regards
Kurt Wagner

Re: Buttonxp and TabPages

Posted: Mon Mar 22, 2010 5:03 pm
by rdonnay
I didn't receive anything.
Did you send it by email?

BTW - I resolved a problem with extreme flickering in builds 253 and 254. It will be fixed in 255.
It happens on tabpages that have colors.

Re: Buttonxp and TabPages

Posted: Fri Nov 12, 2010 2:25 am
by wkedv
Hi Roger,

please can you say me, when Build 255 will be ready regarding the problem with the flickering ?

Or is it possible to give me an update only with this problem, because i would need this very urgent.

Thanks and regards Kurt

Re: Buttonxp and TabPages

Posted: Fri Nov 12, 2010 9:04 am
by rdonnay
Kurt -

Sorry about that. Here is your fix.
Replace the METHOD DC_XbpTabPage:WhenHideEval() in _DCCLASS.PRG with the below code.

Then rebuild DCLIPX.DLL by running BUILD19.BAT or BUILD19_SL1.BAT

Code: Select all

METHOD DC_XbpTabPage:WhenHideEval( lEnable, lShow, lProtect )

LOCAL lMinimized := ::minimized, aColors, lEnabled

IF Valtype(::whenBlock) == 'B'
  lEnabled := Eval(::whenBlock,self)
  IF lEnabled .AND. !::isEnabled()
    lEnable := .t.
    ::Enable()
  ELSEIF !lEnabled .AND. ::isEnabled()
    ::Disable()
  ENDIF
  IF Valtype(::saveColor)='N' .AND. ::saveColor # ::colorBG
    ::Maximize()
    IF lMinimized
      ::Minimize()
    ENDIF
  ENDIF
  ::saveColor := ::colorBG
ENDIF

IF Valtype(::hideBlock) = 'B'
  lShow := !Eval(::hideBlock,self)
  IF lShow
    IF !Empty(::initPos)
      ::setPos(::initPos)
      ::initPos := nil
    ENDIF
  ELSE
    IF Empty(::initPos)
      ::initPos := ::currentPos()
      ::setPos( {-2000,-2000})
    ENDIF
  ENDIF
ENDIF

IF ::isEnabled()
  IF Valtype(::enabledColorBlock) = 'B'
     aColors := Eval(::enabledColorBlock,self)
     DEFAULT aColors := {}
     ASize(aColors,2)
     ::enabledColorFG := ConvertColor(aColors[1])
     ::enabledColorBG := ConvertColor(aColors[2])
  ENDIF
  IF Valtype(::enabledColorBG)='N' .AND. !(::setColorBG() == ::enabledColorBG)
    ::setColorBG(::enabledColorBG)  // enabled BG color
  ENDIF
  IF Valtype(::enabledColorFG)='N' .AND. !(::setColorFG() == ::enabledColorFG)
    ::setColorFG(::enabledColorFG)  // enabled FG color
  ENDIF
ELSE
  IF Valtype(::disabledColorBlock) = 'B'
    aColors := Eval(::disabledColorBlock,self)
    DEFAULT aColors := {}
    ASize(aColors,2)
    ::disabledColorFG := ConvertColor(aColors[1])
    ::disabledColorBG := ConvertColor(aColors[2])
  ENDIF
  IF Valtype(::disabledColorBG)='N' .AND. !(::setColorBG() == ::disabledColorBG)
    ::setColorBG(::disabledColorBG)  // disabled BG color
  ENDIF
  IF Valtype(::disabledColorFG)='N' .AND. !(::setColorFG() == ::disabledColorFG)
    ::setColorFG(::disabledColorFG)  // disabled FG color
  ENDIF
ENDIF

IF Valtype(::protectBlock) = 'B'
  lProtect := Eval(::protectBlock,self)
ENDIF

RETURN self

Re: Buttonxp and TabPages

Posted: Sat Nov 13, 2010 3:26 am
by wkedv
Hi Roger,

Sorry, because its the same.

Please have a look at my sample

Thanks Kurt

Re: Buttonxp and TabPages

Posted: Sun Nov 14, 2010 8:21 am
by rdonnay
That is hard to believe.

Terry Wolfe had the same problem and I gave him the same fix.
It worked for him.

Re: Buttonxp and TabPages

Posted: Sun Nov 14, 2010 11:18 am
by rdonnay
I didn't completely read your postings.
I thought you were using colored tabpages.

Now I see that you are using simulated tabpages.

I will see what I can do.