+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
  1. #1
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2009
    Posts
    171

    Default DCL text and box width

    Registered forum members do not see this ad.

    I'm wring a dialog box with some text. My problem is that when I view my dialog box I have this fairly large amount of space to the right of my text. I tried changing widths of the boxes but I can't get rif of that gap. If I make the widthes huge i see the change. if I try to make it small I will only go as small as my text is wide + that gap.

    Anyone have this problem?

    a second question

    This dialog box displays if a block is not found. The block name is set as a variable in the lisp.
    How can I get this to display in the dialog box?
    Last edited by guitarguy1685; 25th Mar 2010 at 05:50 pm.

  2. #2
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by guitarguy1685 View Post
    I'm wring a dialog box with some text. My problem is that when I view my dialog box I have this fairly large amount of space to the right of my text. I tried changing widths of the boxes but I can't get rif of that gap. If I make the widthes huge i see the change. if I try to make it small I will only go as small as my text is wide + that gap.

    Anyone have this problem?
    Just to give you an idea:


    Code:
    : popup_list {
      key = "MYKEY";          // Set your key here.
      width = 18.0;           // Set your width here
      fixed_width = true;     // Set it as fixed width
      alignment = centered;   // Center the list
    }
    You can adjust the width larger or smaller by changing the value.

  3. #3
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,743

    Default

    As Buzzard says, most like the fixed_width attribute. AfraLISP has a pretty good walkthrough for dialogs if you haven't seen it already.
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  4. #4
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2009
    Posts
    171

    Default

    heres i my code

    Code:
     
    //DCL CODING STARTS HERE
    BLK_INS_ERROR
    : dialog {
     fixed_width = true; 
     label = "©2009 test test";
     
     : boxed_column {
     label = "BLOCK NOT FOUND";
     alignment = centered;
     fixed_width = true;
     width = 15;
     value = 0;
     : paragraph {
     : text {
     label = "test test test test test testtest test test  ";
     }
     : text {
     label = "test tes testtest test test test test test  ";
     }
     }
     : paragraph {
     : text {
     label = "test test testtest test test test test test ";
     }
     : text {
     label = "test test testtest test test test test test  ";
     }
     : text {
     label = "test test testtest test test test test test ";
     }
     }
     }
     : button {
     key = "accept";
     label = "Cancel";
     is_default = true;
     fixed_width = true;
     alignment = centered;
     is_cancel = true;
     is_tab_stop = true;
     }
     }
    the width is not working for me

  5. #5
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by guitarguy1685 View Post
    heres i my code

    Code:
     
    //DCL CODING STARTS HERE
    BLK_INS_ERROR
    : dialog {
     fixed_width = true; 
     label = "©2009 test test";
     
     : boxed_column {
     label = "BLOCK NOT FOUND";
     alignment = centered;
     fixed_width = true;
     width = 15;
     value = 0;
     : paragraph {
     : text {
     label = "test test test test test testtest test test  ";
     }
     : text {
     label = "test tes testtest test test test test test  ";
     }
     }
     : paragraph {
     : text {
     label = "test test testtest test test test test test ";
     }
     : text {
     label = "test test testtest test test test test test  ";
     }
     : text {
     label = "test test testtest test test test test test ";
     }
     }
     }
     : button {
     key = "accept";
     label = "Cancel";
     is_default = true;
     fixed_width = true;
     alignment = centered;
     is_cancel = true;
     is_tab_stop = true;
     }
     }
    the width is not working for me
    You did not identify the type of tile and You are missing } at the end.

    Code:
     
    : popup_list {
      label = "BLOCK NOT FOUND";
      alignment = centered;
      fixed_width = true;
      width = 15;
      value = 0;
    }
    

  6. #6
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    After looking over your dialog file, I am not sure what you are trying to do.
    Do you want a list or have the program report back to the dialog.
    I am not sure.

    Can you post your code with it so I can see whats going on?

    This dialog box displays if a block is not found. The block name is set as a variable in the lisp.
    How can I get this to display in the dialog box?
    Maybe an alert box would be better than a dialog box for what you are trying to do.

  7. #7
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Seems to me all you really need is this:

    Display an alert box.
    Code:
    (defun MISSING_BLOCK ()
      (alert "BLOCK NOT FOUND!")
      (princ))

    or this:

    Print to command line.
    Code:
    (defun MISSING_BLOCK ()
      (princ "BLOCK NOT FOUND!")
      (princ))

  8. #8
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2009
    Posts
    171

    Default

    Well I would do an alert if all I wanted was to show the error. This dialog box however will have some more information. and possibly show the full path of the block.
    Attached Images

  9. #9
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Quote Originally Posted by guitarguy1685 View Post
    Well I would do an alert if all I wanted was to show the error. This dialog box however will have some more information. and possibly show the full path of the block.
    Ok Im with you,
    But can you post the lisp code as well?

  10. #10
    Forum Deity
    Using
    AutoCAD 2009
    Join Date
    Oct 2008
    Posts
    2,112

    Default

    Registered forum members do not see this ad.

    So you are expecting something like this:


    Code:
    BLK_INS_ERROR : dialog {
                    label = "©2009 test test";
                    : row {
                      : column {
                        : boxed_column {
                          label = "BLOCK NOT FOUND";
                          : paragraph {
                            : text {
                              value = "test test test test test test test test test";
                              fixed_width = true;
                              width = 30;
                            }
                            : text {
                              value = "test test test test test test test test test";
                              fixed_width = true;
                              width = 30;
                            }
                          }
                          : paragraph {
                            : text {
                              value = "test test test test test test test test test";
                              fixed_width = true;
                              width = 30;
                            }
                            : text {
                              value = "test test test test test test test test test";
                              fixed_width = true;
                              width = 30;
                            }
                            : text {
                              value = "test test test test test test test test test";
                              fixed_width = true;
                              width = 30;
                            }
                          }
                        }
                      }
                    }
                    : button {
                      key = "accept";
                      label = "Cancel";
                      is_default = true;
                      fixed_width = true;
                      alignment = centered;
                      is_cancel = true;
                      is_tab_stop = true;
                    }
                  }
    Change label to value for the text.
    Attached Images

Similar Threads

  1. Text Width
    By Rooster in forum AutoCAD General
    Replies: 7
    Last Post: 20th Dec 2009, 12:50 am
  2. Dimension text width
    By PeteUK in forum AutoCAD General
    Replies: 2
    Last Post: 21st Aug 2009, 12:04 am
  3. MText - Text Width
    By happyunited in forum AutoCAD General
    Replies: 4
    Last Post: 20th Jan 2009, 04:29 pm
  4. Dimension text width?
    By PeteUK in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 5
    Last Post: 29th Feb 2008, 11:04 am
  5. M-TEXT [-] WIDTH?
    By J-LYLE in forum AutoCAD Drawing Management & Output
    Replies: 11
    Last Post: 21st Oct 2005, 09:47 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