AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

hint problem

Ein Thema von neumimnemecky · begonnen am 21. Dez 2018 · letzter Beitrag vom 22. Dez 2018
Antwort Antwort
neumimnemecky

Registriert seit: 21. Dez 2018
45 Beiträge
 
#1

hint problem

  Alt 21. Dez 2018, 12:01
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.
  Mit Zitat antworten Zitat
HolgerX

Registriert seit: 10. Apr 2006
Ort: Leverkusen
961 Beiträge
 
Delphi 6 Professional
 
#2

AW: hint problem

  Alt 21. Dez 2018, 12:50
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.
  Mit Zitat antworten Zitat
neumimnemecky

Registriert seit: 21. Dez 2018
45 Beiträge
 
#3

AW: hint problem

  Alt 21. Dez 2018, 13:09
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.

Geändert von neumimnemecky (21. Dez 2018 um 17:34 Uhr)
  Mit Zitat antworten Zitat
Der schöne Günther

Registriert seit: 6. Mär 2013
6.110 Beiträge
 
Delphi 10 Seattle Enterprise
 
#4

AW: hint problem

  Alt 21. Dez 2018, 13:09
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
  Mit Zitat antworten Zitat
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

Registriert seit: 21. Dez 2018
45 Beiträge
 
#6

AW: hint problem

  Alt 21. Dez 2018, 17:37
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.
  Mit Zitat antworten Zitat
Delphi.Narium

Registriert seit: 27. Nov 2017
2.415 Beiträge
 
Delphi 7 Professional
 
#7

AW: hint problem

  Alt 21. Dez 2018, 17:59
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.
  Mit Zitat antworten Zitat
Redeemer

Registriert seit: 19. Jan 2009
Ort: Kirchlinteln (LK Verden)
1.017 Beiträge
 
Delphi 2009 Professional
 
#8

AW: hint problem

  Alt 22. Dez 2018, 19:54
Starting with Windows Vista, you do not have to care about the charsets supported by the font you use. Windows will do it automatically.
Janni
2005 PE, 2009 PA, XE2 PA
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:13 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