LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Change title font in popup panels

Hi all!
I'm developing an application with CVI 8.1. This application also use a Greek font to display greek words and until now I did not have any problem in displaying
the greek language in the panels, I simply change the font of the controls and title bars and I see greek characters.
But I can't see the desired font in the title bar of the panels that I display with the "InstallPopup" function.

I can see the greek font in the controls of that panel show with InstallPopup but the title but the title not.

I've got 20 panels in the uir file, the first one is loaded as a "Top level" panel, the others as child panels of the first one.

I've already set the the Title Bar Style as "Classic" for the panels I want the title to be displayed with greek fonts but it only work for panel I display with
DisplayPanel, not with the panels I display with InstallPopup.

Any idea?

Regards,
 Dimitri
0 Kudos
Message 1 of 4
(3,636 Views)
Hello Dimitri,
 
When you specify a font for the panel title, that font is only used if the panel is loaded as a child panel. When you display a panel as a top-level panel (regardless of whether you call DisplayPanel or InstallPopup), the font that is used for the title, as well as every other aspect related to the titlebar and the window frame, is determined by the operating system.
 
Also, keep in mind that while you might be loading all your panels as child panels, once you call InstallPopup on a child panel, the resulting window is a top-level, modal window. It is no longer a child panel.
 
If you need to display Greek characters in your UI, the only way to do it reliably in a CVI application is to set the operating system's language to Greek (in XP: Control Panel >> Regional and Language Options >> Advanced >> Language for non-Unicode programs). Once you change the language (and reboot), you should be able to use any font of your choice in the UI, and it will be able to display the appropriate symbols, and it will also be able to display the Latin characters at the same time, since these are universally defined as part of the ASCII standard (0-127). And the font chosen by the operating system for top-level windows should also be able to display those characters.
 
Hope this helps
Luis
0 Kudos
Message 2 of 4
(3,610 Views)
Thank you Luis for your answer.
The solution you suggested me, will not help me a lot since I have this multi-language User Interface and I have to switch between various language.

The other thing is that I load the strings from text files and I assign the texts to the labels right before displaying the panels on the screen.
I also have the same control that can display different strings, depending on what's happening on the machine (I.E. Error messages, info messages and so on).

So I have multiple files for each language and I load the strings from the files when I start the program or when I change the language and the
text is assigned at run time.

So I show different languages with a single UIR file. I thought to use a different UIR file with greek because of the different font and I'm using a greek font
that maps greek chars in the 0-255 position of the Ascii table (so I can write a text file with some "strange" words in it but when I display them in the greek
uir file I get the right greek words).

Everything until now is working fine, the only problems I have is of course the title of the popup panels but I think I will display in another way, not modal as the InstallPopup do or
I will not display the title in the greek version. The other problem is I can't show greek letters and latin letter at the same time (or at least not in the same control). That will be a bit more difficult to solve.

When CVI will support UNICODE?
0 Kudos
Message 3 of 4
(3,606 Views)
Dimitri,
 
We hope to address in the very near future the problem of mixing different character sets in the same user interface. That will probably be achieved by somehow allowing you to specify the character set at the same time that you specify the font, instead of simply inheriting it from Windows.
 
Unfortunately, as far as the title of top-level panels are concerned, you have no way of specifying the font (or the character set) of the panel title, at least not without also changing it for every other window in the computer. So this probably will not be solved in the immediate future.
 
We're aware that supporting Unicode would resolve this issue, but that is much more involved. It's something that has implications not just for the user interface library, but also for the compiler, the editor, etc. It's in the CVI roadmap, but it's probably not going to be a short-term thing.
 
Luis
0 Kudos
Message 4 of 4
(3,604 Views)