Recent

Author Topic: TBCImageButton - change caption at runtime  (Read 2008 times)

raule

  • Newbie
  • Posts: 2
TBCImageButton - change caption at runtime
« on: October 09, 2016, 08:18:57 pm »
Hello,

this is my first post in this forum and I hope you can help me. I have searched but not found a solution for this problem:

In a project I am using TBCImageButton to style my program (on Windows 10). Styling at design time works fine, but I have a problem with changing the buttons' captions at runtime.

This is what I actually want to do:

The user may chose between two languages while program is running, so he can switch between German and English at any time. I thought it would be simple like this, but using following line will do nothing while program is running:

procedure change_language
begin
  BCImageButton1.caption:='Hello';
  Button1.caption:='Hello';
end;

Simple TButton (button1.caption) works fine, TBCImageButton gets no change...

Is there something I am missing?

Thanks for help :)

lainz

  • Hero Member
  • *****
  • Posts: 3699
  • Leandro Diaz
Re: TBCImageButton - change caption at runtime
« Reply #1 on: October 09, 2016, 09:07:38 pm »
Hi maybe it's a bug
I will check it

Edit: Done, It was a missing function to update text inside the BCImageButton class. Please download BGRA-Controls Git from here to get the fix:
https://github.com/bgrabitmap/bgracontrols
« Last Edit: October 09, 2016, 09:26:24 pm by lainz »

raule

  • Newbie
  • Posts: 2
Re: TBCImageButton - change caption at runtime [solved]
« Reply #2 on: October 09, 2016, 10:10:10 pm »
It works now! Thanks a lot!

 

TinyPortal © 2005-2018