irneb Posted January 11, 2012 Posted January 11, 2012 Look into the fixed_width = true; and width = ###; Quote
Brick_top Posted January 11, 2012 Author Posted January 11, 2012 I can avoid it by changing the dwg name to the boxed_column info_dcl : dialog {label = "Histórico do ficheiro"; : boxed_column {label = "forum-maio03-EXE-RECTIFICAÇÃO-7.04_completo.dwg"; : list_box { is_enabled = true; edit_width = 60; height = 30; width = 60; key = "nt1lstf"; } } ok_only; } if that fixed_width code to use after :dialog? Quote
Brick_top Posted January 12, 2012 Author Posted January 12, 2012 How can I run a slide with a button? Here is what I'm doing : button { label = "t slide"; key = "slide"; width = 15; fixed_width = true; alignment = centered; is_default = true; } (defun exeslide () (command "vslide" titl4) ;titl4 directory and name of the slide );defun (action_tile "slide" "(setq ddiag 2)(exeslide)(done_dialog)") When I click the button autocad freezes. Quote
irneb Posted January 12, 2012 Posted January 12, 2012 You can't call a command while the dialog is still showing. You need to first hide the dialog and then re-show it after the command completes. This is what's referred to as modal dialogs. Unfortunately DCL does not allow non-modal, for those you'd need something like OpenDCL. Quote
Brick_top Posted January 12, 2012 Author Posted January 12, 2012 ok, cool. I'll see if I can do it. Quote
fixo Posted January 12, 2012 Posted January 12, 2012 Not exactly what you wanted be but it may helps too ;;slide.lsp (defun c:SlideTest (/ dcl_id ) (setq dcl_id (load_dialog "slide.dcl")) (new_dialog "begun" dcl_id) (set_tile "dia" " In example...") (set_tile "hor" "1") (setq const (get_tile "txt")) (action_tile "hor" (strcat "(progn (setq position (atoi $value))" "(cut_text position \"txt\")" "(if (= position 1)(set_tile \"txt\" const)))" ) ) (action_tile "vert" "(scroll_text \"txt\" \"vert\" const)") (action_tile "accept" "(done_dialog)(setq hit T)") (action_tile "cancel" "(done_dialog)(setq hit nil)") (setq result (start_dialog)) (unload_dialog dcl_id) (princ) ) (defun cut_text (pos txt) (set_tile txt (substr (get_tile txt) (1+ pos)) ) ) (defun scroll_text (txt slider wholetext) (set_tile txt (substr wholetext (* 50 (atoi (get_tile slider)) ) ) );<== 50 number of characters per text line (calculate and put manually on debug) ) //slide.dcl begun : dialog { key = "dia"; label = ""; spacer; : row { : text_part {label = "See the text:"; key = "txt"; value = "The Bald Eagle (Haliaeetus leucocephalus Greek hali = salt, aeetus = eagle, leuco = white, cephalis = head) is a bird of prey found in North America. It is the national bird and symbol of the United States of America. This sea eagle has two known sub-species and forms a species pair with the White-tailed Eagle. Its range includes most of Canada and Alaska, all of the contiguous United States, and northern Mexico. It is found near large bodies of open water with an abundant food supply and old-growth trees for nesting. The adult Bald Eagle is mainly brown with a white head and tail. The sexes are identical in plumage, but females are larger than males. The beak is large and hooked. The plumage of the immature is brown. Bald Eagles are not actually bald; the name derives from the older meaning of the word, \"white headed\"."; edit_width = 40; height=5; color=2; } : slider { layout = vertical;//by default it's verical key = "vert"; min_value = 1; max_value = 4;//<==exact number of text lines small_increment = 1; big_increment = 2; height = 7;//<==vertical size(about max_value + arrow size) } } : row { height = 1.0; : text_part { key = "empty"; label = ""; edit_width = 40; } : slider { key = "hor"; min_value = 1; max_value = 831; //<==string length exactly small_increment = 1; big_increment = 2; width = 42; fixed_width = true; is_tab_stop = false; } } ok_cancel; } Quote
Brick_top Posted January 12, 2012 Author Posted January 12, 2012 Hi there, I've already done part of what I want but I have learned some things from your dcl thanks Quote
fixo Posted January 12, 2012 Posted January 12, 2012 You're welcome, Would be good for other community to see your final product Quote
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.
Note: Your post will require moderator approval before it will be visible.