Page 1 of 1

IWCGMessageDlg Autosize

PostPosted: 03 Dec 2015 12:03
by feland
Hi,

I used the following instruction to see a error message.
Code: Select all
IWCGMessageDlg('EXCEPTION: Error in btnInsertJQButtonOptionsClick: ' + e.Message, mtError, [mbOK], nil);


But if a message text in more long i obtain the result in picture. How can i solve my problem??

Best Regards,
feland

Re: IWCGMessageDlg Autosize

PostPosted: 03 Dec 2015 18:52
by Alexander Bulei
Hi feland,

In this case, you need create and customize the dialog by yourself.
Here you have the simple example:

delphi code
procedure TIWForm10.IWCGJQButton2JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
var
MyDlg: TIWCGJQMsgDialog;
begin
MyDlg:= IWCGCreateMessageDialog('<long-message-here>',mtError,[mbYes], nil);
MyDlg.JQDialogOptions.AutoHeight:= True;
MyDlg.Label_.AutoSize:= True;
MyDlg.Label_.StyleRenderOptions.RenderPosition:= False;
MyDlg.Label_.StyleRenderOptions.RenderSize:= False;
MyDlg.Label_.StyleRenderOptions.RenderPadding:= False;
MyDlg.Label_.StyleRenderOptions.RenderBorder:= False;
MyDlg.Label_.Css:= MyDlg.Label_.Css + ' ui-dialog-label-autosize';
MyDlg.AjaxReRender(True,False);
end;


Best Regards.

Re: IWCGMessageDlg Autosize

PostPosted: 04 Dec 2015 17:18
by feland
Don't work.

I insert this string to test 'rteywdfiywdfidwfitweyiftewirtfwiertfiewtfwerilti9ròuewirgweriògyeoòrugyweoòruruerguòewroiguyweilrògu'

Re: IWCGMessageDlg Autosize

PostPosted: 04 Dec 2015 17:19
by Alexander Bulei
Hi feland,

I insert this string to test 'rteywdfiywdfidwfitweyiftewirtfwiertfiewtfwerilti9ròuewirgweriògyeoòrugyweoòruruerguòewroiguyweilrògu'


Of course your message will contain "spaces". lol :D

Best Regards.

Re: IWCGMessageDlg Autosize

PostPosted: 10 Dec 2015 10:45
by feland
Thanks :D