delphi - How to Increase MessageDlg width in Delphi7? -


i working on delphi 7. want change messagedlg width.

i mean message test long because of message displaying in 2 lines want display message in 1 line.

below single line of code

messagedlg('i want display in oneline want display in oneline want display in oneline want display in oneline want display in oneline',mterror,[mbok],0) 

and out put is: enter image description here

above message displaying in 2 lines want display message in 1 line.

in delphi 7 messagedlg function implemented on top of createmessagedialog. can call method , have tform instance returned you. can widen form, widen label, , show form.

var   form: tform;   label: tlabel; .... form := createmessagedialog(msg, mterror, [mbok]); try   label := form.findcomponent('message');   label.width := label.width + extrawidth;   form.clientwidth := form.clientwidth + extrawidth;   form.position := poscreencenter;   showmodal;   form.free; end; 

all remains work out extrawidth. in implementation of createmessagedialog inspiration there. presumably you'd want include logic avoid making form wide, spreading beyond width of monitor , on.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -