En este caso el botón de la izquierda es un TbtnBmp y el de la derecha un TRbtn, ¿posibilidad de que TBtnBmp quede como el TRbtn?
![Image](https://i.imgur.com/FUVI2oW.png)
Gracias!
Code: Select all | Expand
#include "fivewin.ch"
#include "ribbon.ch"
Function Main()
Local oDlg, oBtn, oFont
Local bGradColors:= { | lInvert | If( lInvert, ;
{ { 1, nRgb (255,225,131), nRgb (255,225,131) }, }, ;
{ { 1, CLR_WHITE, CLR_WHITE }, };
);
}
DEFINE FONT oFont NAME GetSysFont() SIZE 0,12 POINTS
DEFINE DIALOG oDlg FROM 0,0 TO 24,79 TITLE "Prueba TBtnBmp" FONT oFont
@ 5,5 BTNBMP oBtn FILE "..\bitmaps\alphabmp\windows.bmp" SIZE 150,40 ACTION oDlg:End() PROMPT "Prueba TBtnBmp";
LEFT GRADIENT bGradColors 2007 FONT oFont
@ 50,5 RBBTN oBtn BITMAP "..\bitmaps\alphabmp\windows.bmp" SIZE 150,40 ACTION oDlg:End() PROMPT "Prueba TRbtn";
LEFT BORDER FONT oFont
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
Return (nil)
Code: Select all | Expand
#include "fivewin.ch"
Function Main()
Local oDlg, oBtn, oFont
Local bGradColors:= { | lInvert | If( lInvert, ;
{ { 1, nRgb (255,225,131), nRgb (255,225,131) }, }, ;
{ { 1, CLR_WHITE, CLR_WHITE }, };
);
}
DEFINE FONT oFont NAME GetSysFont() SIZE 0,12 POINTS
DEFINE DIALOG oDlg SIZE 400,500 PIXEL TITLE "Prueba TBtnBmp" FONT oFont TRUEPIXEL
@ 10,10 RBBTN oBtn BITMAP "..\bitmaps\alphabmp\windows.bmp" SIZE 300,80 ACTION oDlg:End() PROMPT "Prueba TRbtn";
LEFT BORDER FONT oFont
@ 100,10 BTNBMP oBtn FILE "..\bitmaps\alphabmp\windows.bmp" SIZE 300,80 ACTION oDlg:End() PROMPT "Prueba TBtnBmp";
LEFT GRADIENT bGradColors 2007 FONT oFont
@ 190,10 BTNBMP oBtn FILE "..\bitmaps\alphabmp\windows.bmp" SIZE 300,80 ACTION oDlg:End() PROMPT "Prueba TBtnBmp ";
LEFT GRADIENT bGradColors 2007 FONT oFont
@ 280,10 BTNBMP oBtn FILE "..\bitmaps\alphabmp\windows.bmp" SIZE 300,80 ACTION oDlg:End() PROMPT " Prueba TBtnBmp ";
LEFT GRADIENT bGradColors 2007 FONT oFont
@ 370,10 BTNBMP oBtn FILE "..\bitmaps\alphabmp\windows.bmp" SIZE 300,80 ACTION oDlg:End() PROMPT " Prueba TBtnBmp ";
LEFT GRADIENT bGradColors 2007 FONT oFont
oBtn:aBmpRect := { 0, 50, 80, 80 }
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
Return (nil)
Code: Select all | Expand
REDEFINE BTNBMP oBtn ID 110 OF oDlg RESOURCE "Edit" ACTION MsgInfo("Editando Ficha") LEFT
oBtn:aBmpRect := { 0, 50, 80, 80 }
nageswaragunupudi wrote:oBtn:aBmpRect := { nTop, nLeft, nBottom, nRight }
in pixels relative to the BtnBmp's rect.
Should work with resources also.
AngelSalom wrote:nageswaragunupudi wrote:oBtn:aBmpRect := { nTop, nLeft, nBottom, nRight }
in pixels relative to the BtnBmp's rect.
Should work with resources also.
Yes, it works with resources.
Code: Select all | Expand
oBtn:aBmpRect := { 105, 185, 120, 265 }
brakaman wrote:AngelSalom wrote:nageswaragunupudi wrote:oBtn:aBmpRect := { nTop, nLeft, nBottom, nRight }
in pixels relative to the BtnBmp's rect.
Should work with resources also.
Yes, it works with resources.
Hola lo siento pero no entiendo como lo haceis.
a ver yo tengo en recursos un BtnBmp situado en
X Position : 180
Y Position : 100
width: 80
Height: 15
Entonces hago:Code: Select all | Expand
oBtn:aBmpRect := { 105, 185, 120, 265 }
Y no aparece el boton.
¿Como lo calculais ?
Gracias y perdon por la confusion.
Off Totip : Por cierto, Angel estamos muy cerca.... (Estoy en Santa Magdalena de Pulpis) Perdon
Saludos.