CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Button Icon disappear on caption modified

by feland » 17 Nov 2015 12:13

Hi,
I insert an icon in jqbutton.jqbuttonOptions.Icons.Picture and I see it.
When i run my application I change on runtime the caption of the button and the images disappear.
Why??

Best Regard
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12

by assapan » 17 Nov 2015 12:44

Hi,
could you tell us how you change the caption ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by feland » 17 Nov 2015 14:08

At start the button is hidden.

These is the code used to show the button and change the caption:

JQButton.Caption:='Insert';
JQButton.show;
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12

by assapan » 17 Nov 2015 15:10

Check the renderinvisiblecontrol property of the button owner and also AjaxRerender of the button
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by feland » 17 Nov 2015 16:08

I don't solve the problem.

I set the property RenderInvisibleControls of the JQRegion that contain my button at true and i call the method AjaxRerender of the button.

I post the code that i used:

procedure TfrmUsersManagement.btnInsertJQButtonOptionsClick(Sender: TObject; AParams: TStringList);
begin
btnConfirm.Caption := 'Insert';
btnConfirm.Show;
btnConfirm.AjaxReRender();
RenderRegionAsync(RegionData, false, true);
end;
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12

by assapan » 17 Nov 2015 16:19

try to replace btnConfirm.Show by btnConfirm.visible:=True;
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by feland » 17 Nov 2015 16:28

I obtain the same result as before
feland
 
Posts: 89
Joined: 15 Jun 2015 15:12

by Alexander Bulei » 17 Nov 2015 16:35

Hi feland,

btnConfirm.Caption := 'Insert';
btnConfirm.Show;
btnConfirm.AjaxReRender();
RenderRegionAsync(RegionData, false, true);


First, you don't need use neither AjaxReRender nor RenderRegionAsync just for this propose, because Caption propery supports async change, as the method Show.

jqbutton.jqbuttonOptions.Icons.Picture


Are you using the Primary or PrimaryPicture property?

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by assapan » 17 Nov 2015 16:48

Hi alex,
I thing i found problem , if you set primarypicture with a picture after setting caption , image disappear see demo
You do not have the required permissions to view the files attached to this post.
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 17 Nov 2015 17:04

Hi assapan,
It seems, this only happens when PrimaryPictureInTextSpan is False.
I will investigate this case.
Thanks.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

Next

Return to JQButton & JQButtonSet

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.