como mudo a cor de um BitBtn quando ele recebe o foco ?
ai galera preciso mudar a cor de um BitBtn quando ele mudar o foco,
o cliente emplicou e quer que o botao mude a cor ao receber o foco :(
Será que alguem pode me ajudar ???????
o cliente emplicou e quer que o botao mude a cor ao receber o foco :(
Será que alguem pode me ajudar ???????
Fabiano Góes
Curtidas 0
Respostas
Porty
28/07/2005
Coloque o envento OnExit e OnEnter o seguitne código
procedure TForm1.BitBtn1Exit(Sender: TObject); begin BitBtn1.Font.Color :=clWindow; end; procedure TForm1.BitBtn1Enter(Sender: TObject); begin BitBtn1.Font.Color :=clMenuHighlight; end;
GOSTEI 0
Fabiano Góes
28/07/2005
E ai Brother porty beleza ?
value pela atenção,
mais quero mudar a cor do ´Botao´ nao da font do botão
mesmo assim grato !!!!
value pela atenção,
mais quero mudar a cor do ´Botao´ nao da font do botão
mesmo assim grato !!!!
GOSTEI 0
Ivanh
28/07/2005
Não é só adaptar agora :?:
Tem que dar tudo mastigadinho :?: :?: :?: :?: :?: :?: :?:
Tem que dar tudo mastigadinho :?: :?: :?: :?: :?: :?: :?:
GOSTEI 0
Marco Salles
28/07/2005
E ai Brother porty beleza ?
value pela atenção,
mais quero mudar a cor do ´Botao´ nao da font do botão
mesmo assim grato !!!!
Não é só adaptar agora
Tem que dar tudo mastigadinho
Eu acho que ele quer dizer o seguinte... Esta propriedade Color Não esta Explicita no TBitBtn...Portanto é razoável que ele tenha uma certa dificuldade...
Acho que o que ele quer e como criar um novo componente derivado da TBitBtn e definir nesse componente esta propriedade color
GOSTEI 0
Ivanh
28/07/2005
Desculpa minha ´inguinoranssa´ :!: :!:
Instale o JEDI 3.00, tem um componente chamado [b:5d1459e52d]TJvImgBtn[/b:5d1459e52d], faz tudo q vc precisa....
Instale o JEDI 3.00, tem um componente chamado [b:5d1459e52d]TJvImgBtn[/b:5d1459e52d], faz tudo q vc precisa....
GOSTEI 0
Rjun
28/07/2005
Salvo me engano, o componente TBitbtn não recebe foco.
GOSTEI 0
Marco Salles
28/07/2005
Salvo me engano, o componente TBitbtn não recebe foco.
Acho que recebe sim , quem não recebeno foco é o TseepdButon
GOSTEI 0
Bruno Belchior
28/07/2005
o TButton como o TBtBtn seguem o padrão do windows... portanto sua cor não é diferente do resto do controle que o contém...
GOSTEI 0
Motta
28/07/2005
Não é mais simples usar o Glyph ??
Specifies the bitmap that appears on the selected bitmap button.
property Glyph: TBitmap;
Description
Use the Open dialog box that appears as an editor in the Object Inspector to choose a bitmap file (with a .BMP extension) to use on the button, or specify a bitmap file at runtime.
You can provide up to four images within a single bitmap. All images must be the same size and next to each other in a row. Bit buttons display one of these images depending on their state.
Image positionButton stateDescription
FirstUpThis image appears when the button is up (unselected). This image is also used when the button has focus (for example, if the user tabs to it); in this case, a focus rectangle is drawn around the button. If no other images exist in the bitmap, bit buttons also use this image for all other states.
SecondDisabledThis image usually appears dimmed to indicate that the button can´t be selected.
ThirdClickedThis image appears when the button is clicked. The Up image reappears when the user releases the mouse button.
FourthDownThis image appears when the button stays down (indicating that it remains selected).
If only one image is present, bit buttons attempt to represent the other states by altering the image slightly for the different states, although the Down state is always the same as the Up state. If you aren´t satisfied with the results, you can provide additional images in the bitmap.
If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the NumGlyphs property.
Note:The lower left pixel of the bitmap is reserved for the “transparent” color. Any pixel in the bitmap which matches that lower left pixel will be transparent.
Specifies the bitmap that appears on the selected bitmap button.
property Glyph: TBitmap;
Description
Use the Open dialog box that appears as an editor in the Object Inspector to choose a bitmap file (with a .BMP extension) to use on the button, or specify a bitmap file at runtime.
You can provide up to four images within a single bitmap. All images must be the same size and next to each other in a row. Bit buttons display one of these images depending on their state.
Image positionButton stateDescription
FirstUpThis image appears when the button is up (unselected). This image is also used when the button has focus (for example, if the user tabs to it); in this case, a focus rectangle is drawn around the button. If no other images exist in the bitmap, bit buttons also use this image for all other states.
SecondDisabledThis image usually appears dimmed to indicate that the button can´t be selected.
ThirdClickedThis image appears when the button is clicked. The Up image reappears when the user releases the mouse button.
FourthDownThis image appears when the button stays down (indicating that it remains selected).
If only one image is present, bit buttons attempt to represent the other states by altering the image slightly for the different states, although the Down state is always the same as the Up state. If you aren´t satisfied with the results, you can provide additional images in the bitmap.
If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the NumGlyphs property.
Note:The lower left pixel of the bitmap is reserved for the “transparent” color. Any pixel in the bitmap which matches that lower left pixel will be transparent.
GOSTEI 0
Rjun
28/07/2005
[quote:535a7527ec=´Marco Salles´]
Acho que recebe sim , quem não recebeno foco é o TseepdButon[/quote:535a7527ec]
Absolutamente certo Marco Salles...fiz uma pequea confusão.
Salvo me engano, o componente TBitbtn não recebe foco.
Acho que recebe sim , quem não recebeno foco é o TseepdButon[/quote:535a7527ec]
Absolutamente certo Marco Salles...fiz uma pequea confusão.
GOSTEI 0
Fabiano Góes
28/07/2005
ai Galera valeu pela força , desculpem a minha iguinorância sou iniciante mesmo por isso entro no forum para pedir uma ajuda ,
Valeu ai quem deu uma atenção a minha humilde pergunta.
Acho que o nosso amigo Ivan nasceu sabendo !!!! :!: :!:
Valeu ai quem deu uma atenção a minha humilde pergunta.
Acho que o nosso amigo Ivan nasceu sabendo !!!! :!: :!:
GOSTEI 0
Ivanh
28/07/2005
teu problema foi resolvido :?: :?: :?:
GOSTEI 0
Marco Salles
28/07/2005
o TButton como o TBtBtn seguem o padrão do windows... portanto sua cor não é diferente do resto do controle que o contém...
eu acho que mesmo que o TbitBtn não tendo a propriedade Color explicita , da para fazer o que ele quer... Ao contrário do TButton , que se for possível ja é bem mais complicado...
GOSTEI 0