Jump to content

Problem with DCL


RepCad

Recommended Posts

Hi all,

I've made a DCL for my Autolisp progoram, it works well but alignment  of tiles is not set :

Can someone modify or rewrite DCL codes to format window( or a better format that you think is better)?

Thanks in advance.

 

897566987_Screenshot(2134).png.ddb7002a7c2fc0cd445b19fb2adcaf2b.png

 

dclnam : dialog { key = "Title"; label = " AutoParcel "; initial_focus = "save"; spacer; width = 35;
 : column {

	     : boxed_row {
	        label = " Fixed values ";
		: edit_box {       
		    label = " Text Size ";
		    key = "txtsize";
		 alignment = left;
		   }
  
		: edit_box {       
			  label = " Decimal ";
			  key = "txtdec";
 			alignment = left;
			 }}
 
		: boxed_column {
		
		label = " Other options ";
		 alignment = left;

		 : row {
		alignment = left;
   		children_fixed_width=true;
		 : text {       
		    label = "";
		    key = "tx1";
		   }

		 : text {       
		    label = "Prefix";
		    key = "tx2";
		   }

		 : text {       
		    label = "Suffix";
		    key = "tx3";
		   }}
		   
	          : row {
		alignment = left;
   		children_fixed_width=true;
		 : toggle {       
		    label = "Area";
		    key = "togarea";
		    
		   }

	          : edit_box {       
			  label = "";
			  key = "areaprefix";
			  fixed_width=true;
			 }

			 : popup_list  {       
		    key = "areasuffix";
		   }
	
			 }
                    
		: row {
                 alignment = left;
                 children_fixed_width=true;
		 : toggle {       
		    label = "Perimeter ";
		    key = "togpri";
		   }
 
		: edit_box {       
			  label = "";
			  key = "priprefix";
			  fixed_width=true;
			 }

		: popup_list  {       
		    key = "prisuffix";
		   }
			 }}  	
		          }
spacer;
	: row {
	fixed_width = true; alignment = centered;
    
   	  
   	  :  button 
             {
               key = "save";
               alignment = centered;
               label = " Save ";
               is_default = false;
               is_cancel = false;
               }
               : cancel_button { label = " EXIT "; width = 11; }
    }
   }

 

 

Edited by amir0914
Link to comment
Share on other sites

dclnam :dialog {label=" AutoParcel ";initial_focus="utmsave";
  spacer;
  :boxed_row {label=" Fixed values ";
    :edit_box {label=" Text Size "; key="txtsize"; alignment=left;}
    :edit_box {label=" Decimal "; key="txtdec"; alignment=left;}}
  :boxed_row {label=" Other options ";
    :column {:text_part {key="tp_1";}:toggle {label="Area"; key="togarea";}:toggle {label="Perimeter"; key="togpri";}}
    :column {:text {label="Prefix";} :edit_box {key="areaprefix";} :edit_box {key="priprefix";}}
    :column {:text {label="Suffix";} :popup_list {key="areasuffix";} :popup_list {key="prisuffix";}}}
    spacer;
  :row {fixed_width=true;alignment=centered;
    :button {key="utmsave"; alignment=centered;label=" Save ";}:cancel_button { label=" EXIT "; width=11;}}
}

 

you don't need to assign a key to the main dialog (key = "Title") and I think you don't need initial_focus if you set is_default = true for your "utmsave" button

🐉

AutoParcel.jpg

  • Like 1
Link to comment
Share on other sites

Thanks for your replying, Is it possible to align center labels or edit boxes? for example I changed to below code but it didn't work :

{:text {label="Prefix";alignment=centered;}

 

1098636738_Screenshot(2136).png.a8af7b811151bbb313e2959c795ec6b9.png

Or

66113530_Screenshot(2135).png.2ce083e2550fa643e6b05c8121fce4cb.png

Edited by amir0914
Link to comment
Share on other sites

dclnam :dialog {label="AutoParcel"; spacer;
  :boxed_row {label="Fixed values";:edit_box {label="Text Size";key="txtsize";}:edit_box {label="Decimal";key="txtdec";}}
  :boxed_row {label="Other options";
    :column {children_alignment=centered;:text_part {key="tp_1";} :toggle {label="Area";key="togarea";}:toggle {label="Perimeter";key="togpri";}}
    :column {children_alignment=centered;:text {label="Prefix"; } :edit_box {key="areaprefix";} :edit_box {key="priprefix";}}
    :column {children_alignment=centered;:text {label="Suffix"; } :popup_list {key="areasuffix";} :popup_list {key="prisuffix";}}} spacer;
  :row {fixed_width=true;alignment=centered;:button {key="utmsave";is_default=true;label="Save";}:cancel_button {label="EXIT";}}
}

  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...