Error con TSButton

Post Reply
User avatar
Mauricio
Posts: 199
Joined: Thu Oct 06, 2005 9:07 pm
Location: San Diego, CA

Error con TSButton

Post by Mauricio »

Hola,

Tengo un error al cambiar el texto a un super button, anexo codigo y error.


Saludos,
Mauricio

mi trozo de codigo

Code: Select all

   REDEFINE SBUTTON oBotones[1] ID 501 OF oDlg FILE BotonFamilia() ADJUST;
            PROMPT 'X' ;
            ACTION msginfo('Menu 1')  LOOK W97 CANCEL COLOR 'W/W'

   oBotones[1]:setText('prueba')

 
trozo de codigo de TSButton.prg, linea donde marca el error

Code: Select all

      nWidth  := ::GetWH( .T., ! Empty( ::hBitMap5 ) )
      nHeight := ::GetWH( .F., ! Empty( ::hBitMap5 ) )

      If nWidth > ::nWidth() .or. nHeight > ::nHeight()
         nWidth  := Max( nWidth, ::nWidth() )
         nHeight := Max( nHeight, ::nHeight() )
         ::SetSize( nWidth, nHeight, .T. )
         ::nRight  := ::nLeft + nWidth
         ::nBottom := ::nTop + nHeight
      EndIf
 
el error lo marca aquí.



Application
===========
Path and name: C:\CLIP53\cash32\ff\ff.Exe (32 bits)
Size: 737,792 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 17-03-2009, 00:33:25
Error description: Error BASE/1082 Argument error: -
Args:
[ 1] = N 0
[ 2] = U

Stack Calls
===========
Called from: .\source\classes\WINDOW.PRG => TSBUTTON:NWIDTH(0)
Called from: C:\CLIP53\CASH32\FF\SOURCE\SUPER\TSBUTTON.PRG => TSBUTTON:SETTEXT(2389)
Called from: C:\CLIP53\CASH32\FF\SOURCE\TOUCH1.PRG => TOUCH1(148)
Called from: C:\CLIP53\CASH32\FF\SOURCE\FF.PRG => (b)BUILDMENU(128)
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: C:\CLIP53\CASH32\FF\SOURCE\FF.PRG => MAIN(93)

System
======
CPU type: AMD Turion(tm) 64 X2 Mobile Technology TL-58 1900 Mhz
Hardware memory: 2048 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: xHarbour build 1.1.0 Intl. (SimpLex) (Rev. 6195)
Windows version: 6.0, Build 6001 Service Pack 1
User avatar
mmercado
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: Error con TSButton

Post by mmercado »

[quote="Mauricio"]Tengo un error al cambiar el texto a un super button, anexo codigo y error
 [/code]Hola Mauricio:

La istrucción: oBotones[1]:setText('prueba'), deberás ponerla en la activación del diálog (ON INIT), ya que en la posición en que la ejecutas todavía no se crea el handle para el objeto TSButton.

Un abrazo.

Manuel Mercado.
manuelmercado at prodigy dot net dot mx
User avatar
Mauricio
Posts: 199
Joined: Thu Oct 06, 2005 9:07 pm
Location: San Diego, CA

Re: Error con TSButton

Post by Mauricio »

Don Manuel,

Gracias ya quedo :-)


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

Re: Error con TSButton

Post by Silvio »

Manuel
when create Tsbutton Alpha bitmap ?
Best Regards, Saludos

Falconi Silvio
Post Reply