Hi !
In Clarion 11.1.13845 easy code:
System{Prop:FontSize} = 11 ! 12
Message('Text in a|few lines|with which|there was|no problem|before')
gives an incorrect result
Previous Clarion releases did not have this problem. Please check !
Hi !
In Clarion 11.1.13845 easy code:
System{Prop:FontSize} = 11 ! 12
Message('Text in a|few lines|with which|there was|no problem|before')
gives an incorrect result
Previous Clarion releases did not have this problem. Please check !
If you haven’t yet, you should report this to SoftVelocity.
I’ve encountered the same and I’ve just added a problem report to PTSS (#43397).
For me it only happens when I set SYSTEM{Prop:FontSize} to a greater value than 8.
Jens
This is how message boxes using fonts of different sizes are looking on my computer using the RTL built from sources sent to SV. Changes in these sources were merged to the working code base. Probably, this was done with some errors.
Thanks ! Perhaps there is a dependence on the font size and type. I use the regular ‘Segoe UI’.
If you have message over 2 lines at the end of message add extra ‘|’
Or 3 Or 4 “|”… depending on the number of lines in the message and size font. Why such a crutch?
Hi ! Unfortunately, the problem also manifests itself with single-line messages in large font. It can be seen that the text is cropped from the bottom and right.
System{Prop:FontSize} = 16
Message('Do you really want to delete the counterparty records selected in the list ?')
Perhaps you need to enable some system font settings? Thanks !
The MESSAGE function calculates the rectangle to draw text in on the base of text extent returned from the call to API’s DrawText function and the dimensions of the primary monitor. This rectangle is never less than extent returned by Windows. Usually, it is wider and higher for 16 dlu in pixels with dlu get from the specified font.
If you can reproduce the issue, I could prepare a variant of the RTL with logging actual information used by MESSAGE.
Thanks for the reply.
The problem with Message() appeared in release C11.1.13845, before that everything worked correctly.
I am ready to provide any assistance to understand the cause of the problem !
I understand it, the problem is related to an error in calculating the text size for the font ‘Segoe UI’ and it can be solved by replacing the system font in Message().
System{Prop:MessageHook} = Address(Message2)
System{Prop:FontSize} = 11 ! 12
Message('Text in a|few lines|with which|there was|no problem|before')
System{Prop:FontSize} = 16
Message('Do you really want to delete the counterparty records selected in the list ?')
...
Message2 PROCEDURE(String sText, <String Caption>, <String Icon>, <String ButtonStr>, UNSIGNED Default = 0, Bool Style = False) !,unSigned,Proc
sSysFont CSTRING(129)
uRetValue UNSIGNED,AUTO
Code
sSysFont = System{Prop:FontName}
System{Prop:FontName} = 'Arial'
System{Prop:MessageHook} = 0
uRetValue = Message(sText,Caption,Icon,ButtonStr,Default,Style)
System{Prop:MessageHook} = Address(Message2)
System{Prop:FontName} = sSysFont
Return uRetValue
After that, all the stated tests work correctly.
Of course, I would like to see the problem resolved by SV, but it is better to work than to wait uselessly …