terrypin Posted April 27, 2009 Report Share Posted April 27, 2009 As you see from the following two screenshots, using variables to place data in a text box doesn't work properly. This first macro uses plain text andisplays correctly: <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\f0\\fs16 Row 1 left side 24 chars Row 1 right side 24 char\\f1 \r\n\\par }\r\n" Left="648" Top="471" Width="521" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> The second macro defines variables first and then uses those in the Text Box display. The result is that an extra CR seems to be inserted, spoiling the layout: <VARIABLE SET STRING Option="\x00" Destination="%Row1Left%" Value="Row 1 left side 24 chars\r\n"/> <VARIABLE SET STRING Option="\x00" Destination="Row1Right" Value="Row 1 right side 24 char\r\n"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\f0\\fs16 %Top%\r\n\\par %Next%\r\n\\par %Row1Left% %Row1Right%\\f1 \r\n\\par }\r\n" Left="648" Top="471" Width="521" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Seems like a bug to me. Anyone able to confirm please? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted April 27, 2009 Report Share Posted April 27, 2009 Not a bug. You have CR-LF in your Set String Var commands. In the code below I removed them for you. <VARIABLE SET STRING Option="\x00" Destination="%Row1Left%" Value="Row 1 left side 24 chars"/> <VARIABLE SET STRING Option="\x00" Destination="Row1Right" Value="Row 1 right side 24 char"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\f0\\fs16 %Row1Left% %Row1Right%\\f1 \r\n\\par }\r\n" Left="648" Top="471" Width="521" Height="200" Monitor="0" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> Quote Link to comment Share on other sites More sharing options...
terrypin Posted April 27, 2009 Author Report Share Posted April 27, 2009 Thanks Cory. I wonder how that got in there? BTW, can you remind me how you are displaying your Code so that it doesn't need scrolling in this forum? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted April 28, 2009 Report Share Posted April 28, 2009 Usually I find that folks accidentally pick up the CRLF because they copy from some text editor and many will try to be clever and assume you want the whole line including the CRLF. As for the code that's still broken There are two commands, code and codebox. Code just puts it in a box and the box is as large as the code so if you have a hundred lines it's going to be big. But codebox should make it a set small size and add scroll bars if need be but it does not work for the horizontal scroll. If you play with it in the preview you can see how it's supposed to work. In this case 'code' worked because I didn't have any excessively long lines of code. With this new formatting support in MEP commands can get pretty long. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.