Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   hint problem (https://www.delphipraxis.net/199067-hint-problem.html)

neumimnemecky 21. Dez 2018 12:01

hint problem
 
Hi there,
I don't speak English, but I would like to ask you about problems regarding TControl.hint . I am using Delphi 7 personal and I have created a form in win32 application. I have buttons with hint which contain some characters from Central Europe charset. These characters are not displayed correctly when hint window is displayed. This is first problem. How to correct it?

Another problem with hint - I have created this method:

Code:
procedure TExport.onHintShow(Sender: TObject);
var Ctr: TControl;
begin
  Ctr := TControl(Sender);
  if Ctr is TComboBox then
    TControl(Sender).Hint := ''
  else
    if Ctr is TListBox then
      begin
        Ctr.Hint := 'Najeli jste myší na ovládací prvek, který automaticky zvětšil kolonku formuláře.';
        // Ctr.Left := export.ClientRect.Left;
        // Ctr.Top := export.ClientRect.Top;
      end;
end;
I add a breakpoint on the begin of the code.

Also I have this procedure:

Code:
procedure TExport.onFormCreate(Sender: TObject);
begin
  Application.HintPause := 100;
  Application.OnHint := onHintShow;
end;
So onHintShow is set when the form is visible. But the onHintShow event is not fired when I hover over the controls which should fire the event.

HolgerX 21. Dez 2018 12:50

AW: hint problem
 
Hmm..

Did you have activate the Hint?

Every control have a property 'ShowHint'. It is 'False' by default.
And it could be that you have to active ShowHint on the Form also...

Delphi7 is only ANSI code, so some Characters, avaible in Unicode, not possible to show with the original controls from Delphi7.

neumimnemecky 21. Dez 2018 13:09

AW: hint problem
 
They are activated.

I have found this solution:

https://stackoverflow.com/questions/...vent-on-delphi

I am experiminating with the TButton.CMHintShow now.

So now I can display the hints using own function, but the problem with charset is an obstacle.

Der schöne Günther 21. Dez 2018 13:09

AW: hint problem
 
Hi there.

Things like
Code:
Najeli jste myš
will never work. This may be how you can encode characters in HTML, but not Delphi. Delphi 7 is extremely old. You will have to use characters from the Czech ANSI charset. I am not sure if these are special characters or just part of your Czech encoding. What happens when you type "Najeli jste myš" instead?

By the way: We have an English speaking forum at
https://en.delphipraxis.net :-)

DP-Maintenance 21. Dez 2018 15:19

Dieses Thema wurde am "21. Dec 2018, 16:19 Uhr" von "Luckie" aus dem Forum "Win32/Win64 API (native code)" in das Forum "GUI-Design mit VCL / FireMonkey / Common Controls" verschoben.

neumimnemecky 21. Dez 2018 17:37

AW: hint problem
 
Thanks for the link to English forum.

I have printed the list of chars of ANSI and the characters like 'ř' are not there.

My idea is to do it differently. I will not display the characters from the hint on the Hint Window but on a label. Some background should be needed.

Delphi.Narium 21. Dez 2018 17:59

AW: hint problem
 
Bitte den Schrifttyp ändern und einen auswählen, der auch die mitteleuropäischen Zeichen enthält.

Diese sind in der Standardschrift MS Sans Serif nicht enthalten.

Es wird ein Zeichensatz nach ISO 8859-2 benötigt, Delphi 7 und MS Sans Serif unterstützen aber nur ISO 8859-1.

https://de.wikipedia.org/wiki/ISO_8859-1
https://de.wikipedia.org/wiki/ISO_8859-2

Arial unterstützt den mitteleuropäischen Zeichensatz.

Translation with https://www.deepl.com/translator

Please change the font and select one that contains the Central European characters.

These are not included in the standard MS Sans Serif font.

A character set according to ISO 8859-2 is required, but Delphi 7 and MS Sans Serif only support ISO 8859-1.

https://de.wikipedia.org/wiki/ISO_8859-1
https://de.wikipedia.org/wiki/ISO_8859-2

Arial supports the Central European character set.

Redeemer 22. Dez 2018 19:54

AW: hint problem
 
Starting with Windows Vista, you do not have to care about the charsets supported by the font you use. Windows will do it automatically.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:41 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz