Results 1 to 7 of 7

Thread: How to get a line break in a info output box?

  1. #1

    How to get a line break in a info output box?

    Hello

    Yes, another newbie question from myself.

    I'm trying to get a data report of a number of variables using 'info'.

    How can I enter them all in one info box, and get line breaks between them. i.e. How do you tell the system to do a line break?

    Thanks!

  2. #2
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,806
    I don't know about LScript, never wrote any, but in OS it's usually \n or \r\n..
    LightWave Plugins
    Global Materials for LightWave 2019
    Custom plugin writing. Request a quote.

  3. #3
    automator of tasks xchrisx's Avatar
    Join Date
    Jul 2003
    Location
    Nevada
    Posts
    593
    Blog Entries
    6
    I tried \n and it didnt seem to work in the ctltext control nor the info options. I understand you want to use the info box, but a requester may be more beneficial in this case. Instead of using the \n you could use an array for reading out your information. Below is an example that will dynamically change window size to show all of your data. Be aware however that you may want to use a listbox if you have a lot of data, or the window in the example below may become too large.


    Generic script to run in Layout:

    Code:
    @warnings
    @version 2.2
    @script generic
    
    generic
    {
    	reqbegin("Test");
    	arrayWords = @"one","two","three","four"@;
    	c1 = ctltext("",arrayWords);
    	return if !reqpost();
        	reqend();
    	
    }
    Last edited by xchrisx; 10-10-2012 at 10:33 AM. Reason: added example code
    My Lscript Collection | LinkedIn
    3D Generalist IGT

  4. #4
    Ok, looks like a good solution.

    Thanks!

  5. #5
    You can also get a line break in any info box with the <br> marker inside the displayed string.
    It's undocumented, of course, and you only have 2 lines total (so only one of these markers works).

  6. #6
    Great, thanks Blochi

  7. #7
    Registered User sami's Avatar
    Join Date
    Jul 2003
    Location
    TopLeft Viewport
    Posts
    994
    Or you could use my MsgBox dialog box script as an include. It's up here somewhere or I can post again if anyone is interested. It needs a few slilght cosmetic tweaks for LW 11 though.

    It works like this:
    Code:
    MsgBox(MSG_CRIT,"This plugin requires <b>morphs</b> to continue.<br>Add some morphmaps and try again.","Morphs2OBJs Error", MSGBOX_CHARWIDTH);
    Last edited by sami; 12-07-2012 at 05:27 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •