Error en cambio de colores oRBar SOLUCIONADO

Error en cambio de colores oRBar SOLUCIONADO

Postby D.Fernandez » Sun May 07, 2017 3:15 am

Amigos: haciendo un cambio de colores en la ribbon con un ejemplo del foro
de inglés me da un error.
Code: Select all  Expand view  RUN
DEFINE RIBBONBAR oRBar WINDOW oWinMain  PROMPT  "Inicio    " ,  "    Archivos    ", "    Reportes Impresos    ", "Utilidades    ",;
                   "    Control de Movimientos    "  HEIGHT 130 TOPMARGIN 25 2015    
                   
               
 
     oRBar:aClrTabTxt  = { { | oSelf , nPrompt  | If( nPrompt == oRBar:nOption, CLR_GREEN , CLR_WHITE  ) },;
                           { | oSelf , nPrompt  | If( nPrompt == oRBar:nOption, CLR_GREEN , CLR_WHITE  ) },;
                           { | oSelf , nPrompt  | IF( nPrompt == oRBar:nOption , CLR_GREEN , CLR_WHITE ) } }
      oRBar:nClrPaneRB =  CLR_GREEN
      oRBar:aGradFld   =  { || { { 1, CLR_WHITE, CLR_WHITE }} }
      oRBar:aGradOver  =  { || { { 1, CLR_WHITE, CLR_WHITE }} }



Application
===========
Path and name: C:\Fuentes\TodoCuentas\zonacuentas.Exe (32 bits)
Size: 5,637,632 bytes
Compiler version: Harbour 3.2.0dev (r1703231115)
FiveWin version: FWH 17.04
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 10 secs
Error occurred at: 07/05/2017, 00:10:40
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... } length: 3
[ 2] = N 5

Stack Calls
===========
Called from: .\source\classes\TRIBBON.PRG => (b)TRIBBONBAR_PAINTFLD( 837 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:PAINTFLD( 859 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:PAINT( 675 )
Called from: .\source\classes\TRIBBON.PRG => (b)TRIBBONBAR( 158 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:DISPLAY( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1697 )
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT( 1159 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3325 )
Called from: => UPDATEWINDOW( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 1013 )
Called from: zonacuentas.PRG => MAIN( 429 )


Gracias, Saludos
FWH 17.04 y Harbour.
Last edited by D.Fernandez on Sun May 07, 2017 4:09 pm, edited 1 time in total.
Dario Fernandez
FWH 24.09, Harbour, MVS2022 Community, BCC, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
D.Fernandez
 
Posts: 468
Joined: Wed Jul 31, 2013 1:14 pm
Location: Maldonado - Uruguay

Re: Error en cambio de colores oRBar

Postby Antonio Linares » Sun May 07, 2017 5:44 am

Ruben,

En este codigo tienes un array con 3 elementos. Como tienes 5 pestañas en la ribbon, tienes que modificarlo para que tenga cinco elementos:

oRBar:aClrTabTxt = { { | oSelf , nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN , CLR_WHITE ) },;
{ | oSelf , nPrompt | If( nPrompt == oRBar:nOption, CLR_GREEN , CLR_WHITE ) },;
{ | oSelf , nPrompt | IF( nPrompt == oRBar:nOption , CLR_GREEN , CLR_WHITE ) } }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Error en cambio de colores oRBar

Postby D.Fernandez » Sun May 07, 2017 4:08 pm

Gracias Antonio, esta funcionando.

Saludos.
Ruben Dario Fernandez
Dario Fernandez
FWH 24.09, Harbour, MVS2022 Community, BCC, MySql & MariaDB, Dbf/Cdx VSCode.
Maldonado - Uruguay
D.Fernandez
 
Posts: 468
Joined: Wed Jul 31, 2013 1:14 pm
Location: Maldonado - Uruguay


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests