TBarTabs Tamaño de los tabs

TBarTabs Tamaño de los tabs

Postby rterraz » Mon Sep 19, 2016 4:06 pm

Hola ,estoy usando TbarTabs y necesito agrandar los tabuladores.
Alguien sabe como hacerlo?. Intente pasar argumentos ( ancho y Alto ) a la Ttabs que llama la clase pero no funciona
Muchas gracias
User avatar
rterraz
 
Posts: 182
Joined: Wed Nov 08, 2006 11:44 pm
Location: Argentina

Re: TBarTabs Tamaño de los tabs

Postby Antonio Linares » Tue Sep 20, 2016 10:58 am

Prueba a modificar:

oTabs:aSizes[ nTab ] := nNuevoAncho
...
oTabs:Refresh()

tendrás que hacerlo para cada una de los tabs
regards, saludos

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

Re: TBarTabs Tamaño de los tabs

Postby rterraz » Tue Sep 20, 2016 2:54 pm

hola Antonio ,gracias por responder

Estuve probando y lo que me dices anda bien para modificar el ANCHO de los tabuladores pero no el ALTO que es lo que necesito porque el height que trae por defectos es de 14 pixels y no se ven muy bien en pantallas complejas.
Intente pasar el parámetro desde la clase TbarTab pero no lo toma.
Investigando la clase Ttab encuentro que hay un define BARHEIGHT que lo fija en 17 pixels y no hay forma de modificarlo desde afuera.
Lo que hice fue introducir una pequeña modificacion en la Tbar que es esta:

#define BARHEIGHT 30 // estaba originalmente en 17

EN EL METODO PAINTTAB()

// esto modifica la ubicacion vertical del texto del tab
do case
case ::nOrientation <= OR_BOTTOM

DrawTextEx( ::hDC, cPrompt ,;
{ If( LargeFonts(), 1, 8 + If( ::nOrientation == OR_TOP, 1,0 ) ),;
nStart + 15 + nBmpWidth, ;
::nHeight, nStart + 20 + nWidth - 15 },;
nOr( DT_LEFT, DT_VCENTER ) )


/* codigo original
DrawTextEx( ::hDC, cPrompt ,;
{ If( LargeFonts(), 1, 1 + If( ::nOrientation == OR_TOP, 1,0 ) ),;
nStart + 15 + nBmpWidth, ;
::nHeight, nStart + 20 + nWidth - 15 },;
nOr( DT_LEFT, DT_VCENTER ) )
*/

// esto modifica la ubicacion vertical del BMP

if ::nOrientation <= OR_BOTTOM
TransBmp( hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ), /* RGB( 255, 0, 255 ) */ nZeroZeroClr, ::hDC,;
nStart + 12, If( ::nOrientation == OR_TOP, 8, 0 ), 16, 16 )

/* codigo original
TransBmp( hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ), /* RGB( 255, 0, 255 )
nStart + 12, If( ::nOrientation == OR_TOP, 1, 0 ), 16, 16 )
*/

Sería interesante poder modificar el BARHEIGHT de la clase con un parametro para poder hacer el cambio sin tocar la clase.
el oTab:aSizes solo guarda el ancho del tab pero no el alto
muchas gracias
User avatar
rterraz
 
Posts: 182
Joined: Wed Nov 08, 2006 11:44 pm
Location: Argentina

Re: TBarTabs Tamaño de los tabs

Postby Antonio Linares » Tue Sep 20, 2016 7:42 pm

la Clase Ttabs usa bitmaps para pintar los tabs, luego para que se vean bien en otros tamaños tendrias que proporcionar
tus propias funciones que devuelvan los bitmaps a usar.

Tienes que proporcionar estas funciones:

hBmpSel = bmp_TabSel()
hBmpSelL = bmp_TabSelL()
hBmpSelR = bmp_TabSelR()
hBmpUnSel = bmp_TabUnSel()
hBmpUnSL = bmp_TabUnSL()
hBmpUnSR = bmp_TabUnSR()

hBmpSelV = bmp_TabSelV()
hBmpSelLV = bmp_TabSelLV()
hBmpSelRV = bmp_TabSelRV()
hBmpUnSelV = bmp_TabUnSelV()
hBmpUnSLV = bmp_TabUnSLV()
hBmpUnSRV = bmp_TabUnSRV()
regards, saludos

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], VitalJavier and 84 guests