Recent

Author Topic: [Resolvido - Solved] - Propriedade Color do StatusBar  (Read 7835 times)

TeoUrbana

  • New Member
  • *
  • Posts: 43
    • Distração For Fun
[Resolvido - Solved] - Propriedade Color do StatusBar
« on: September 26, 2014, 09:12:30 pm »
Pessoal,
é sério mesmo que a propriedade color do StatusBar é somente de enfeite?
Ela não funciona.  >:D
Tem como mudar a cor do StatusBar?
« Last Edit: September 30, 2014, 04:36:47 pm by TeoUrbana »

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: Propriedade Color do StatusBar
« Reply #1 on: September 27, 2014, 10:27:35 am »
Desculpe a tradução - Eu estou usando o Google Translate.

Bem visto - você tem razão:-) TStatusbar.Color só funciona sob QT & GTK2, não Win32.

Este é um fórum da comunidade. Para que os desenvolvedores saibam disto, por favor acesse um problema no Mantis (o fórum de acompanhamento de bugs), ou discutir sobre as listas de discussão.

http://bugs.freepascal.org/view_all_bug_page.php

Eu já verifiquei Mantis, e isso não é um problema conhecido.

E no caso de o Google Translate está quebrado, eu vou voltar a copiar este texto em Inglês:-)

(Original reply in English)
Quote
Sorry about the translation - I'm using Google Translate.

Nicely spotted - you're right :-)  TStatusbar.Color only works under QT & GTK2, not Win32.

This is a community forum.  To let the developers know of this, please log an issue in Mantis (the bug tracking forum), or discuss on the mailing lists.

http://bugs.freepascal.org/view_all_bug_page.php

I've already checked Mantis, and this is not a known issue.

And in case Google Translate is broken, I'll recopy this text in English :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Propriedade Color do StatusBar
« Reply #2 on: September 27, 2014, 11:00:27 am »
(Desculpe, usando o Google Translate também)

Nota: as incompatibilidades conhecidas para as várias plataformas são mostrados no navegador Restrição ("View/Restriction Browser") no IDE. Você pode querer dar uma olhada lá primeiro para ver se é um problema conhecido.

Obrigado.

Original post in English:
(Sorry, using Google Translate as well)

Note: known incompatibilities for the various platforms are shown in the Restriction Browser in the IDE. You might want to have a look there first to see if it is a known problem.

Thanks.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

TeoUrbana

  • New Member
  • *
  • Posts: 43
    • Distração For Fun
Re: Propriedade Color do StatusBar
« Reply #3 on: September 29, 2014, 02:58:30 am »
Google translator too.
Thanks for the response. I had never paid attention to restrictions.
Well, is there a way to color your statusbar?


Quote
"tradutor Google também.

Obrigado pela resposta.
Nunca havia dado atenção às restrições.
Bom, será que existe uma maneira de colorir o statusbar?"

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: Propriedade Color do StatusBar
« Reply #4 on: September 29, 2014, 03:03:28 pm »
Quote
Well, is there a way to color your statusbar?

Eu acho que o comportamento sob win32 é um problema, e deve ser registrado no Mantis - Vou cuidar disso, se quiser.

No entanto, existe uma solução alternativa:
Quote
(English)
I think behaviour under win32 is an issue, and should be logged in Mantis - I'll take care of that if you like.

However, a workaround exists:

StatusBar.SimplePanel := False;
Add a Panel.  Set Panel.Style := psOwnerDraw;
Assign an event to StatusBar.OnDrawPanel;

Code: [Select]
procedure TForm1.StatusBar4DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect);
begin
  StatusBar.Canvas.Brush.Color := clBlue;
  StatusBar.Canvas.Pen.Color := clBlue;
  StatusBar.Canvas.Rectangle(Rect);
  StatusBar.Canvas.TextOut(Rect.Left+2, Rect.Top+2, Panel.Text);
end;   

Não é bem certo, entretanto. Borders ainda desenhado em clDefault.

Quote
(English)
Not quite right though.  Borders still drawn in clDefault.
« Last Edit: September 29, 2014, 03:08:08 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

TeoUrbana

  • New Member
  • *
  • Posts: 43
    • Distração For Fun
[Resolvido-Solved]Re: Propriedade Color do StatusBar
« Reply #5 on: September 30, 2014, 04:31:11 pm »
Thanks Mike.

Quote
Eu acho que o comportamento sob win32 é um problema, e deve ser registrado no Mantis - Vou cuidar disso, se quiser.

Por favor, fique a vontade para reportar.
Quote
(English)
Please feel free to report

Quote
procedure TForm1.StatusBar4DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect);
begin
  StatusBar.Canvas.Brush.Color := clBlue;
  StatusBar.Canvas.Pen.Color := clBlue;
  StatusBar.Canvas.Rectangle(Rect);
  StatusBar.Canvas.TextOut(Rect.Left+2, Rect.Top+2, Panel.Text);
end;

The code was very useful, thank you for that too.
Quote
(Português)
O código foi de muita utilidade, obrigado por isto também.
« Last Edit: September 30, 2014, 04:35:32 pm by TeoUrbana »

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #6 on: September 30, 2014, 05:59:16 pm »
Thanks Mike.

Meu prazer:-) Eu realmente gostei desta conversa.

Por favor, fique a vontade para reportar.

Sem problemas, eu vou conseguir esse feito hoje:-)

Pergunta: Será que o Google Translate produzir sentenças aceitáveis​​?

Temos alguns outros usuários do fórum que lutam com o Inglês. Se isso funcionou bem, eu vou sugerir que eles têm a opção de repetir seu posto duas vezes - uma em Inglês e uma vez em sua língua nativa.

Quote
(English version of the above) No problems, I'll get onto that today.

Question:  Did Google Translate produce acceptable sentences?

We've some other users on the forum who struggle with English.  If this worked well, I'm going to suggest they have the option of repeating their post twice - once in English and once in their native tongue.
« Last Edit: September 30, 2014, 06:03:47 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

hrayon

  • Full Member
  • ***
  • Posts: 118
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #7 on: September 30, 2014, 08:30:26 pm »
Quote
Pergunta: Será que o Google Translate produzir sentenças aceitáveis​​? (Question:  Did Google Translate produce acceptable sentences?)

Para obter uma tradução melhor, eu uso o Google translator (GT) em duas etapas: Minha linguagem -> GT -> Linguagem alvo -> GT -> Minha linguagem. Se no final a ideia é a mesma, tudo bem. Senão, eu substituo algumas palavras do texto original até eu obter uma boa tradução. É quase perfeito.

For a better translation, I use google translator (GT) in two steps: My language -> GT -> Target Language -> GT -> My language. If in the end the idea is the same, fine. Otherwise, I substitute a few words from the original text until I get a good translation. It's almost perfect.

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #8 on: September 30, 2014, 08:57:59 pm »
Eu gosto da sua ideia verificação da qualidade e sua maneira de apresentar o texto alternativo em itálico:-)
Acho que temos um caminho a seguir:-)

I like your quality check idea and your way of presenting the alternative text in italics :-)
I think we have a way forward :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

TeoUrbana

  • New Member
  • *
  • Posts: 43
    • Distração For Fun
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #9 on: October 01, 2014, 04:26:36 am »
Apoio total. :D
Eu acho que mesmo com a tradução não sendo 100%, consegue-se ter a compreensão do assunto, que é o mais importante. ;D
E assim seguimos nos ajudando! ::)

Full support.  :D
I think even with the translation being 100%, no-one can have an understanding of the subject, which is the most important.  ;D
And so we follow helping us!
::)

hrayon

  • Full Member
  • ***
  • Posts: 118
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #10 on: October 01, 2014, 03:22:28 pm »
Olá TeoUrbana.

Acho que sua língua é o português. Mas a tradução em uma etapa que eu suponho que você fez no Google Translator ficou confusa! :) Por isso recomendo a tradução com a "realimentação", ou seja, em duas etapas como sugeri.

Eu não sou fluente na língua inglesa, mas percebi que a tradução ficou controversa. Lá diz, sem usar o Google Translator, que "mesmo a tradução sendo 100%, *ninguém pode ter um entendimento do assunto*, que é o mais importante".  O mais importante é ninguém ter o entendimento do assunto?  :D

Outra dica que aprendi é tentar ser breve e escrever apenas o estritamente necessário, de forma clara, como se estivesse conversando com uma pessoa com vocabulário reduzido, como com uma criança de pouca idade. A língua portuguesa é muito "rica", e isso é um problema para os programas tradutores.

Hello TeoUrbana.

I think your language is Portuguese. But the translation in one step I suppose you made ​​on Google Translator was confused!  :) So I recommend a translation with "feedback", ie, in two steps as suggested.

I'm not fluent in English, but I realized that the translation was controversial. It says, without using Google Translator, that "even the translation is 100%, * no one can have an understanding of the subject *, which is the most important." The most important is no one have understanding of the subject? :D

Another tip I learned is to try to be brief and write only what is necessary, clearly, as if talking to a person with limited vocabulary as with a young child. The Portuguese language is very "rich" and this is a problem for translators programs.

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #11 on: October 09, 2014, 10:48:56 pm »
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #12 on: October 10, 2014, 09:56:20 pm »
Pessoal,
é sério mesmo que a propriedade color do StatusBar é somente de enfeite?
Ela não funciona.  >:D
Tem como mudar a cor do StatusBar?

<Google Translate of original post>
staff
is serious even if the color property of the StatusBar is only garnish?
It does not work.
Is to change the color of StatusBar?


<via Google Translate>
Acontece que este não é um bug, mas a barra de status obedecendo janelas temas.

Para resolver, você pode fazer um dos seguintes procedimentos:
1. Use OWNERDRAW (que eu acho que você é)
2 Desative o manifesto para a sua aplicação.
3. Use UxTheme, e desabilitar o Windows temas para a barra de status

Eu ter fechado a questão em Mantis

It turns out this is not a bug, but the statusbar obeying windows themes.
To resolve, you can do one of the following:
1.  Use OwnerDraw (which I think you are)
2.  Disable the manifest for your application.
3.  Use UxTheme, and disable windows themes for the statusbar
I have closed the issue in Mantis


Code: [Select]
Uses
  UxTheme;
...
procedure TForm1.Button1Click(Sender: TObject);
begin
  if SetWindowTheme<>nil then
    SetWindowTheme(StatusBar1.Handle, ' ', ' ');

  StatusBar1.Color:=clRed;
end; 
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

TeoUrbana

  • New Member
  • *
  • Posts: 43
    • Distração For Fun
Re: [Resolvido - Solved] - Propriedade Color do StatusBar
« Reply #13 on: February 03, 2015, 03:47:20 pm »
Olá TeoUrbana.

Acho que sua língua é o português. Mas a tradução em uma etapa que eu suponho que você fez no Google Translator ficou confusa! :) Por isso recomendo a tradução com a "realimentação", ou seja, em duas etapas como sugeri.

Eu não sou fluente na língua inglesa, mas percebi que a tradução ficou controversa. Lá diz, sem usar o Google Translator, que "mesmo a tradução sendo 100%, *ninguém pode ter um entendimento do assunto*, que é o mais importante".  O mais importante é ninguém ter o entendimento do assunto?  :D

Outra dica que aprendi é tentar ser breve e escrever apenas o estritamente necessário, de forma clara, como se estivesse conversando com uma pessoa com vocabulário reduzido, como com uma criança de pouca idade. A língua portuguesa é muito "rica", e isso é um problema para os programas tradutores.

Hello TeoUrbana.

I think your language is Portuguese. But the translation in one step I suppose you made ​​on Google Translator was confused!  :) So I recommend a translation with "feedback", ie, in two steps as suggested.

I'm not fluent in English, but I realized that the translation was controversial. It says, without using Google Translator, that "even the translation is 100%, * no one can have an understanding of the subject *, which is the most important." The most important is no one have understanding of the subject? :D

Another tip I learned is to try to be brief and write only what is necessary, clearly, as if talking to a person with limited vocabulary as with a young child. The Portuguese language is very "rich" and this is a problem for translators programs.


You right!

The correct, i think, would be:
"... is not 100%, it is possible to have an understanding of the subject..."
Thanks hrayon

 

TinyPortal © 2005-2018