Hi everyone.
I have these 2 lines of code:
-----
TextOut(#CENTER, WinHeight/4, GetCatalogString(16, "Critical Error!")) ; Display a blank line and then string 5 with the solution, with English fallback
-----
TextOut(#CENTER, WinHeight/4 + 40, GetCatalogString(5, "Error: The executable must be run from the AmiWORP-Gate directory.\n\nTo solve this issue, ensure that the executable is located in the correct folder.\nIf the executable is not inside the AmiWORP-Gate folder, the application will not function correctly and will continue to show this error.\n\nThe program will close in:"))
-----
There are 2 TextOut commands.
I'm going crazy trying to figure out why the first command works fine and places itself perfectly in the center of the window I have open, while the second is all wrong and seems to start further to the left of the window, practically outside the window and therefore missing pieces, like if the #CENTRE command doesn't work.
Ideas ?
Also is there a way to justify the text ?
Thanks everyone
bySpawnPPC
TextOut command and text Justify
Re: TextOut command and text Justify
how certain you are that catalogstring id =16 is NOT a "" (correctly loaded but empty string ?)
more code needed, just a small sniped showing problem not your entire program
for example problem maybe in calculating WinHeight !?
i.e. have you try the "faulty command" with hardcoded position ?
TextOut(100, 100, GetCatalogString(16, "Critical Error!"))
more code needed, just a small sniped showing problem not your entire program
for example problem maybe in calculating WinHeight !?
i.e. have you try the "faulty command" with hardcoded position ?
TextOut(100, 100, GetCatalogString(16, "Critical Error!"))
Christos
Re: TextOut command and text Justify
Maybe your strings are too long?
Try to insert an argument table with WordWrap at the end of your string between the closing brackets "...), {WordWrap=600})" and replace the 600 with your window width.
Try to insert an argument table with WordWrap at the end of your string between the closing brackets "...), {WordWrap=600})" and replace the 600 with your window width.
Re: TextOut command and text Justify
I done, thanx !!!
bySpawnPPC
bySpawnPPC
Re: TextOut command and text Justify
BTW, your second question is answered in the TextOut() manual entry: Add "Align=#JUSTIFIED" to the argument table. Of course this works only for exactly this text object.