09-25-2023, 04:56 AM
(This post was last modified: 09-26-2023, 01:43 AM by RenSword.
Edit Reason: remove icon
)
When using TIWButton.Image.WebFontClass to create icon button, adjusting some property of the button (Css, Visible, Enabled) asynchronously will make the icon disappear.
To replay, create a IW project
1) In IWAppForm, add font awesome to contentFile (https://cdnjs.cloudflare.com/ajax/libs/f...me.min.css).
2) Add 2 TIWbutton.
3) 1st button set TIWButton.Image.WebFontClass to 'fa fa-plus'.
4) 2nd button create OnAsyncClick Event.
- For sample attached (IWButtonBug.zip), click on bug button to replay the issue
To replay, create a IW project
1) In IWAppForm, add font awesome to contentFile (https://cdnjs.cloudflare.com/ajax/libs/f...me.min.css).
2) Add 2 TIWbutton.
3) 1st button set TIWButton.Image.WebFontClass to 'fa fa-plus'.
4) 2nd button create OnAsyncClick Event.
Code:
procedure TIWForm1.btnBugAsyncClick(Sender: TObject; EventParams: TStringList);
begin
// TIWControlImage for icon button break if change any of the below one in async
btnIcon.Css := 'test';
// btnIcon.Visible := not btnIcon.Visible;
// btnIcon.Enabled := not btnIcon.Enabled;
end;