View Issue Details

IDProjectCategoryView StatusLast Update
0016665LazarusLCLpublic2010-06-28 06:54
ReporterNikolayAssigned ToMaxim Ganetsky 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWin32/64OSWindows 7OS VersionHome (32 bit)
Product VersionProduct Build 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0016665: On TButtonPanel button's captions is not correct in runtime
DescriptionI set captions to buttons in TButtonPanel in design time, but in runtime it's set to default.
Now I can't localize buttons in my program.
TagsNo tags attached.
Fixed in Revision26267, 26268
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2010-06-07 17:52

 

bug.jpg (60,128 bytes)
bug.jpg (60,128 bytes)

Juha Manninen

2010-06-07 20:03

developer   ~0038373

The ButtonPanel unit has this:

  TPanelBitBtn = class(TCustomBitBtn)
  public
    constructor Create(AOwner: TComponent); override;
  published
    // the translation of the IDE at designtime is used default item
    property Caption stored True;
...
  end;


It seems you must localize your whole Lazarus to localize your app.
It may not be the ideal solution. It is common to use IDE in English but still localize the application.

Maxim Ganetsky

2010-06-07 21:27

developer   ~0038374

You don't have to localize whole Lazarus, you should localize only your application instead.

In this case you should load LCL translation in your application to have ButtonPanel button captions translated. See http://wiki.lazarus.freepascal.org/Translations_/_i18n_/_localizations_for_programs for more info.

Another way is to assign these captions at runtime.

Nikolay

2010-06-08 13:15

reporter   ~0038383

I try localize my application. I set in design time ButtonPanel.Button.Caption, but if after compilation I run apllication, all captions is set to default (in english!) value (in Lazarus I use russian language, and default captions on ButtonPanel's buttons is russian).

I can set captions in runtime, but in my program more 15 dialogs, and I need to use more 30 strings of code - this is not normal. If ButtonPanel.Button have Caption and this Captions can be set in design mode, then I like to use this.

Nikolay

2010-06-08 13:16

reporter   ~0038384

Also I can't use default russian localization, when I need to use not default captions on some buttons.

Nikolay

2010-06-08 13:39

reporter   ~0038388

Oh! For ButtonPanel also not saved Button.Name and Button.OnClick! Now I can't use ButtonPanel for any actions!

Maxim Ganetsky

2010-06-22 23:14

developer   ~0038751

Please test and close if ok.

Nikolay

2010-06-27 17:08

reporter   ~0038836

Now it's work! Thank!

Nikolay

2010-06-28 06:54

reporter   ~0038846

Bug fixed. Closed.

Issue History

Date Modified Username Field Change
2010-06-07 17:52 Nikolay New Issue
2010-06-07 17:52 Nikolay File Added: bug.jpg
2010-06-07 17:52 Nikolay Widgetset => Win32/Win64
2010-06-07 20:03 Juha Manninen Note Added: 0038373
2010-06-07 21:27 Maxim Ganetsky LazTarget => -
2010-06-07 21:27 Maxim Ganetsky Status new => resolved
2010-06-07 21:27 Maxim Ganetsky Resolution open => no change required
2010-06-07 21:27 Maxim Ganetsky Assigned To => Maxim Ganetsky
2010-06-07 21:27 Maxim Ganetsky Note Added: 0038374
2010-06-08 13:15 Nikolay Note Added: 0038383
2010-06-08 13:16 Nikolay Status resolved => assigned
2010-06-08 13:16 Nikolay Resolution no change required => reopened
2010-06-08 13:16 Nikolay Note Added: 0038384
2010-06-08 13:39 Nikolay Note Added: 0038388
2010-06-08 22:11 Maxim Ganetsky Assigned To Maxim Ganetsky =>
2010-06-08 22:11 Maxim Ganetsky Status assigned => new
2010-06-22 23:14 Maxim Ganetsky Fixed in Revision => 26267, 26268
2010-06-22 23:14 Maxim Ganetsky Status new => resolved
2010-06-22 23:14 Maxim Ganetsky Fixed in Version => 0.9.29 (SVN)
2010-06-22 23:14 Maxim Ganetsky Resolution reopened => fixed
2010-06-22 23:14 Maxim Ganetsky Assigned To => Maxim Ganetsky
2010-06-22 23:14 Maxim Ganetsky Note Added: 0038751
2010-06-27 17:08 Nikolay Note Added: 0038836
2010-06-28 06:54 Nikolay Status resolved => closed
2010-06-28 06:54 Nikolay Note Added: 0038846