GARANTIR DESCONTO

Fórum como mudo a cor de um BitBtn quando ele recebe o foco ? #289946

28/07/2005

0

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 ???????


Fabiano Góes

Fabiano Góes

Responder

Posts

31/07/2005

Porty

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;



Responder

Gostei + 0

01/08/2005

Fabiano Góes

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 !!!!


Responder

Gostei + 0

01/08/2005

Ivanh

Não é só adaptar agora :?:

Tem que dar tudo mastigadinho :?: :?: :?: :?: :?: :?: :?:


Responder

Gostei + 0

01/08/2005

Marco Salles

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


Responder

Gostei + 0

01/08/2005

Ivanh

Desculpa minha ´inguinoranssa´ :!: :!:

Instale o JEDI 3.00, tem um componente chamado [b:5d1459e52d]TJvImgBtn[/b:5d1459e52d], faz tudo q vc precisa....


Responder

Gostei + 0

01/08/2005

Rjun

Salvo me engano, o componente TBitbtn não recebe foco.


Responder

Gostei + 0

01/08/2005

Marco Salles

Salvo me engano, o componente TBitbtn não recebe foco.


Acho que recebe sim , quem não recebeno foco é o TseepdButon


Responder

Gostei + 0

01/08/2005

Bruno Belchior

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...


Responder

Gostei + 0

01/08/2005

Motta

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.


Responder

Gostei + 0

01/08/2005

Rjun

[quote:535a7527ec=´Marco Salles´]
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.


Responder

Gostei + 0

02/08/2005

Fabiano Góes

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 !!!! :!: :!:


Responder

Gostei + 0

02/08/2005

Ivanh

teu problema foi resolvido :?: :?: :?:


Responder

Gostei + 0

02/08/2005

Marco Salles

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...


Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar