TSButton 5 with the latest FWH and xHarbour releases

Timm Sodtalbers
Posts: 25
Joined: Sat Oct 08, 2005 6:44 am
Location: Aurich, Germany
Contact:

TSButton 5 with the latest FWH and xHarbour releases

Post by Timm Sodtalbers »

Hi,

I would like to use TSButton 5 with the latest FWH and xHarbour releases. I added TSButton.prg, TSBar.prg, TSLines.prg, TSRadio.prg, TSTSay.prg and BPaint.c to my compile/link script and got several unresolved externals like MAKESEPARATOR and SBTNPAINT.
That is strange because the function are all part of BPaint.c.
So what could be the problem?
Best regards, Timm.

Timm Sodtalbers
Sodtalbers IT
www.reportdesigner.info
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Post by Gale FORd »

I am using TSButton 5 with xHarbour Builder and FWH 2.7 with no problem
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

there is a problem in xharbour fw 2.7 with tsbutton 4.0/5.0
If you compile the sample of reservation bus you can see when you click the buttons with number ..

send me the class if you see the reservation bus run ok

regards
Best Regards, Saludos

Falconi Silvio
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Post by Gale FORd »

I have asked about the problem with animation but nobody has an answer yet. I think it has something to do with the manipulation of the multiple image bitmaps. Everything else seems to be working ok.
Timm Sodtalbers
Posts: 25
Joined: Sat Oct 08, 2005 6:44 am
Location: Aurich, Germany
Contact:

Post by Timm Sodtalbers »

Perhaps someone can send my Bpaint.obj (built with the latest xHarbour version)?
Best regards, Timm.

Timm Sodtalbers
Sodtalbers IT
www.reportdesigner.info
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Last summer I asked Help to all because the animation of tsbutton on 32 bit not run ok

If you can see the example of bus reservation you can see the tsbutton on (x)harbour not run ok

But none help me .....and I Not could convert my application on 32 bit...

Regards
Best Regards, Saludos

Falconi Silvio
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Where is the example bus reservation?
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

Timm Sodtalbers wrote:Perhaps someone can send my Bpaint.obj (built with the latest xHarbour version)?
Tim,

BPaint should be independent of the version of xHarbour. It´s a C-module.
I can mail you the obj, if you want

Stefan
User avatar
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Post by Detlef Hoefner »

Otto wrote:Where is the example bus reservation?
Hello Otto,

if you run testbtn.exe from Manuel Mercado you have a sample of button matrixes.
It's the second button from the left of the button bar. ( Superman Sign ;- )

There you can see buttons with a roll over effect.

Regards,
Detlef
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

I ´ve built the lib with XHarbour 099.60. But I can´t test it, cause I´ve only FWH2.4.

Everyone who want´s to get it, please drop me a line

Stefan
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

For all :
these are the lines into testbtn.prg

this func create a bus reservation with many seats
if you click on each the button not modify the image ( in (x)harbour e fw)

Why ?






Code: Select all

Static Function Child3()

   // using matrixes of Super Buttons

   Local oFont, oFont1, nEle, bAction, oBut, nAct, nSub, oBar, oBar1, ;
         aBtn1, aBtn2, aCapt1, aCapt2, aAct1, aAct2

   If aChild[ 3 ] == Nil

      // Method Disable() permits virtually inactivate a button (not actually),
      // it can be done by passing a key code as parameter.
      // To use this facility, is necessary to define the third bitmap (inactive
      // state) or a multi-bitmap (4 in 1).
      bAction := {|oBtn| oBtn:cCaption := "", oBtn:Disable( VK_RBUTTON ), ;
                         oBtn:Refresh() }

      DEFINE FONT oFont NAME "Arial" SIZE 0, -12
      DEFINE FONT oFont1 NAME "Arial" SIZE 0, -8

      DEFINE WINDOW aChild[ 3 ] OF oWnd FROM 0, 0 TO 250, 500 PIXEL ;
             TITLE "Super Buttons  Matrixes of Buttons. " + ;
                   "  Bus Reservations" ;
             COLOR CLR_BLACK, CLR_CYAN ;
             MDICHILD

      // playing with empty buttonbars just for aparience
      DEFINE BUTTONBAR oBar OF aChild[ 3 ] SIZE 10, 10 LEFT
      DEFINE BUTTONBAR oBar1 OF aChild[ 3 ] SIZE 20, 20 RIGHT

      // un array para los objetos TSButton
      // para matrices de botones, el array debe ser bidimensional
      aBtn1 := { Array( 10 ), Array( 10 ) } // matriz de botones

      // buttons actions must be codeblocks contained in a unidimentional
      // array
      aAct1 := Array( 20 )
      AFill( aAct1, bAction )

      // buttons captions must be contained in a unidimentional array
      aCapt1 := { "1", "5", "9", "13", "17", "21", "25", "29", "33", "37", ;
                  "2", "6", "10", "14", "18", "22", "26", "30", "34", "38" }

      // creando la matriz
      @10,90 SBGROUP aBtn1 OF aChild[ 3 ] ;
             CAPTION aCapt1 ;
             SIZE 34, 34 PIXELS ;
             FONT oFont ;
             ACTION aAct1 ;
             RESOURCE "Seatm", "Seatm", "Seatm", "Seatm" ; // multi bitmap
             MESSAGE "Click izquierdo: Reservar Asientos.  " + ;
                     "Click derecho: Cancelar Reservación." ;
             COLORS CLR_WHITE, CLR_CYAN ;
             TEXT ON_CENTER ;
             LOOK W97
      // para usar un bitmap multiple ( 4 en 1 ) debes definir el mismo
      // bitmap para los cuatro estados

      nAct := 1


      // here I'm using the "Cargo" variable to store the button's caption
      // in order to restore it later when reactivate the button
      // Virtual disable let you to use right click to reset a button
      For nEle := 1 To Len( aBtn1 )
         For nSub := 1 To Len( aBtn1[ nEle ] )
            aBtn1[ nEle, nSub ]:Cargo := aCapt1[ nAct++ ]
            aBtn1[ nEle, nSub ]:bRClicked := {|oBtn| fCancel( oBtn ) }
         Next
      Next

      // let's define another matrix ( only 4 statements)
      aBtn2 := { Array( 10 ), Array( 10 ) }
      AFill( aAct2 := Array( 20 ), bAction )
      aCapt2 := { "3", "7", "11", "15", "19", "23", "27", "31", "35", "39", ;
                  "4", "8", "12", "16", "20", "24", "28", "32", "36", "40" }

      @108,90 SBGROUP aBtn2 ;
              PROMPT aCapt2 OF aChild[ 3 ] ;
              SIZE 34, 34 PIXELS ;
              FONT oFont ;
              ACTION aAct2 ;
              RESOURCE "Seatm", "Seatm", "Seatm", "Seatm" ; // multi bitmap
              MESSAGE "Left Click: To reservate seats.  " + ;
                      "Right Click: To Cancel Reservation." ;
              COLORS CLR_WHITE, CLR_CYAN ;
              TEXT ON_CENTER ;
              LOOK W97

      nAct := 1

      For nEle := 1 To Len( aBtn2 )
         For nSub := 1 To Len( aBtn2[ nEle ] )
            aBtn2[ nEle, nSub ]:Cargo := aCapt2[ nAct++ ]
            aBtn2[ nEle, nSub ]:bRClicked := {|oBtn| fCancel( oBtn ) }
         Next
      Next

      // the folowing buttons are no part of a group
      @10, 20 SBUTTON oBut PROMPT "Exit" OF aChild[ 3 ] FONT oFont ;
              SIZE 60,20 PIXEL ACTION aChild[ 3 ]:End() ;
              COLORS CLR_WHITE, CLR_BLUE

      @128, 20 SBUTTON OF aChild[ 3 ] RESOURCE "Driver" PIXEL ; // FONT oFont ;
               MESSAGE "Please, don't disturb the driver" ;
               COLOR CLR_BLACK, CLR_CYAN ;
               NOBOX

      @176, 60 SBUTTON RESOURCE "TV" OF aChild[ 3 ] PIXEL ;
               FONT oFont1 ;
               CAPTION "TV" ;
               COLOR CLR_WHITE, CLR_CYAN ;
               TEXT ON_CENTER ;
               NOBOX

      @176,200 SBUTTON RESOURCE "TV" OF aChild[ 3 ] PIXEL ;
               FONT oFont1 ;
               CAPTION "TV" ;
               COLOR CLR_WHITE, CLR_CYAN ;
               TEXT ON_CENTER ;
               NOBOX

      @176,310 SBUTTON  RESOURCE "Seatm", "Seatm", "Seatm", "Seatm" OF aChild[ 3 ] PIXEL ;
               FONT oFont1 ;
               CAPTION "TV" ;
               COLOR CLR_WHITE, CLR_CYAN ;
               TEXT ON_CENTER ;
               NOBOX       ;
                ACTION aAct2

      SET MESSAGE OF aChild[ 3 ] TO "Super Buttons, ¡ Matrixes of Buttons !"

      ACTIVATE WINDOW aChild[ 3 ] ;
               VALID ( aChild[ 3 ] := Nil, oFont:End(), oFont1:End(), .T. )

   Else
      aChild[ 3 ]:SetFocus()
   EndIf

Return Nil
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Best Regards, Saludos

Falconi Silvio
Timm Sodtalbers
Posts: 25
Joined: Sat Oct 08, 2005 6:44 am
Location: Aurich, Germany
Contact:

Post by Timm Sodtalbers »

Stefan,

please send me the lib built with XHarbour 099.60.
Perhaps you could add the bpaint.obj, too?

info at reportdesigner dot info
Best regards, Timm.

Timm Sodtalbers
Sodtalbers IT
www.reportdesigner.info
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Post by StefanHaupt »

ok, done
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

Dear Timm, have you correct the error ?

Best Regards,
Best Regards, Saludos

Falconi Silvio
Post Reply