Vlark.Lopin
Vlark.Lopin

Reputation: 792

non latin characters in popupmenu caption

I Have a Simple popup menu in a vcl application , but there is something weird happened when i write non-latin characters into the popup-menu Caption

the characters written correctly but it has this extra characters added (Z) at the end of the caption. this characters only added when i type non-latin words into the caption , English words shows correctly .

here is the dfm of the test project

object Form1: TForm1
  Left = 0
  Top = 0
  BorderIcons = [biSystemMenu]
  Caption = 'Form1'
  ClientHeight = 242
  ClientWidth = 472
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PopupMenu = PopupMenu1
  PixelsPerInch = 96
  TextHeight = 13
  object PopupMenu1: TPopupMenu
    Left = 232
    Top = 128
    object N1: TMenuItem
      Caption = #1575#1604#1604#1594#1577' '#1575#1604#1593#1585#1576#1610#1577
    end
  end
end

and this is an image of how the result comes out . this extra (Z) i did not write it into the caption at all . i don't know why its showing any idea why ?

enter image description here

Upvotes: 3

Views: 351

Answers (1)

Roman Yankovsky
Roman Yankovsky

Reputation: 1217

TPopupMenu tries to automatically set a hotkey for each menu item (if you didn't do this manually by using & char). You can change your PopupMenu.AutoHotkeys property value to maManual if you want to avoid this behaviour.

Upvotes: 6

Related Questions