Toolbar

Toolbar

Postby Patricio Avalos Aguirre » Tue Jun 27, 2006 9:12 pm

Estimados

Hay alguna forma de eliminar un item del toolbar

saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Wed Jun 28, 2006 10:22 am

Patricio,

Añade este método a la Clase TToolBar:
Code: Select all  Expand view
#define TB_DELETEBUTTON        1046

METHOD DelButton( nButton ) CLASS TToolBar

   SendMessage( ::hWnd, TB_DELETEBUTTON, nButton - 1, 0 )
   
return nil   
regards, saludos

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

Postby Patricio Avalos Aguirre » Wed Jun 28, 2006 8:10 pm

Gracias antonio

Perfecto..

Saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Patricio Avalos Aguirre » Thu Jun 29, 2006 1:14 pm

De nuevo por aqui

Como puedo ocultar y mostrar un icono del toolbar, buscando en internet vi estos ejemplos pero no funcionan

alguien me puede orientar

Code: Select all  Expand view
#define TB_HIDEBUTTON          1028

METHOD HideButton( nButton ) INLINE SendMessage(::hwnd,   TB_HIDEBUTTON, nButton-1, 1 )

METHOD ShowButton( nButton ) INLINE SendMessage(::hwnd, TB_HIDEBUTTON, nButton-1, 0 )


Saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Patricio Avalos Aguirre » Thu Jul 06, 2006 1:31 pm

Estimados

Viendo estos metodos llegue a la conclusion que si funcionan, lo raro es que hay que ir a la inversa y diferencia del delbuton que el boton no se resta -1


Code: Select all  Expand view
#define TB_DELETEBUTTON        1046
#define TB_HIDEBUTTON           1028

METHOD HideButton( nButton ) INLINE SendMessage(::hwnd, TB_HIDEBUTTON, nButton, 1 )

METHOD ShowButton( nButton ) INLINE SendMessage(::hwnd, TB_HIDEBUTTON, nButton, 0 )

METHOD DelButton(  nButton ) INLINE SendMessage( ::hWnd, TB_DELETEBUTTON, nButton - 1, 0 )

for i := len( aBnt ) to 1 STEP -1

  aBtn[i]:HideButton( i )

next i

User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Thu Jul 06, 2006 4:32 pm

Patricio,

Gracias! :)
regards, saludos

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

Postby Patricio Avalos Aguirre » Fri Jul 07, 2006 10:33 pm

Aqui hay otra y funciona bien


Code: Select all  Expand view
#define TB_ISBUTTONHIDDEN      1036


METHOD IsButtonHidden( nButton ) INLINE (SendMessage( ::hWnd, TB_ISBUTTONHIDDEN, nButton, 0 ) <> 0 )




Saludos
Patricio
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Postby Antonio Linares » Sat Jul 08, 2006 6:46 am

Patricio,

Muchas gracias :)
regards, saludos

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 166 guests