OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Hypersonic on December 12, 2009, 01:21:16 PM

Title: force next line in a large text box....
Post by: Hypersonic on December 12, 2009, 01:21:16 PM
the set text in a text box needs to be a long string.... I would like to make a large text box populate and be able to control when the
next line is started... as in the below:

1. this is first line of text
2. this is second line
3. third line
4. etc.

but I don't know if there is a special character to control this?

Thanks!
Title: Re: force next line in a large text box....
Post by: BazzaCAD on December 12, 2009, 01:41:08 PM
does /n work?
Title: Re: force next line in a large text box....
Post by: Hypersonic on December 12, 2009, 02:08:51 PM
I tried it, it did not....
Title: Re: force next line in a large text box....
Post by: Kerry on December 12, 2009, 02:18:01 PM

I don't know of a way.

Can you use a listbox ??

Title: Re: force next line in a large text box....
Post by: Kerry on December 12, 2009, 02:24:04 PM

Something like :
Code (autolisp) Select

(vl-load-com)
(command "OPENDCL")

;;;---------------------------------------------------------------------------
;;;

;|<<MAIN>>|;

(defun c:Hype1 (/ dialogreturn)
  (dcl_project_load "HYPE-01" T)
  (dcl_form_show HYPE-01_F)
  ;;------ 
  (princ)
)

;;;---------------------------------------------------------------------------
;;;
;|<<OPENDCL Handlers Event>>|;

;;;-------------------------------------------
(defun c:Hype-01_F_Populate_OnClicked (/)
  (setq longTextString (list
                         "1. this is first line of text"                         
                         "2. this is second line"
                         "3. third line"
                         "4. etc."
                        )
  )
  (dcl_ListBox_AddList Hype-01_F_ListBox1 longTextString)
)

;;;-------------------------------------------
(defun c:Hype-01_F_ListBox1_OnSelChanged (ItemIndexOrCount Value /)
  (dcl_MessageBox Value "Selected Value from ListBox" 2 2)
)

;;;---------------------------------------------------------------------------
;;;
(princ)



Refer attachments:
Title: Re: force next line in a large text box....
Post by: Hypersonic on December 12, 2009, 02:47:51 PM
That should work! 

Thanks!
Title: Re: force next line in a large text box....
Post by: Fred Tomke on December 12, 2009, 03:07:00 PM
Hi guys, I'm not sure if you meant this (http://www.opendcl.com/forum/index.php?topic=1076.msg5658#msg5658).

Fred
Title: Re: force next line in a large text box....
Post by: Hypersonic on December 12, 2009, 03:07:09 PM
Yes that works perfect!!!
Title: Re: force next line in a large text box....
Post by: Hypersonic on December 12, 2009, 03:08:53 PM
Thanks Fred, that might have been easier.....  ::)