dcl - fix it plz

dcl - fix it plz

Anonymous
Not applicable
891 Views
3 Replies
Message 1 of 4

dcl - fix it plz

Anonymous
Not applicable

hello guys always thank you

I got this dcl by searching on the internet. I want to add one column.

 

SAMPLE1 : dialog {
          label = "Sample Dialog Box Routine - Part 1";
          : column {
            : boxed_column {
              : button {
               key = "but1";
               label = "Button 1";
               is_default = false;
              }
              : button {
               key = "but2";
               label = "Button 2";
               is_default = false;
              }
              : button {
               key = "but3";
               label = "Button 3";
               is_default = false;
              }
            }
            : boxed_row {
              : button {
               key = "cancel";
               label = "Close";
               is_default = true;
               is_cancel = true;
              }
            }  
          }
}

 

Sample Dialog Bos Routine - Part1

---------------
Button 1
---------------
---------------
Button 2
---------------  
---------------
Button 3
---------------
---------------
 Close
---------------

 

 

like this

---------------      ---------------
  Button 1                Button 4
---------------      ---------------
---------------      ---------------
  Button 2                Button 5
---------------      ---------------
---------------      ---------------
  Button 3                 Button 6
---------------      ---------------
         --------------------
                  Close
         --------------------

0 Likes
Accepted solutions (1)
892 Views
3 Replies
Replies (3)
Message 2 of 4

dbhunia
Advisor
Advisor
Accepted solution

Try Like this.....

 

SAMPLE1 : dialog { 
label = "Sample Dialog Box Routine - Part 1"; 
: boxed_row { 
     : column { 
            : row { 
              : button 	{ key = "but1";
               		  label = "Button 1";
               		  is_default = false;
              		}
              : button 	{ key = "but4";
               		  label = "Button 4";
               		  is_default = false;
              		}
            	  }
            : row { 
              : button 	{ key = "but2";
               		  label = "Button 2";
               		  is_default = false;
              		}
            : button 	{ key = "but5";
               		  label = "Button 5";
               		  is_default = false;
              		}
            	  }
            : row { 
              : button 	{ key = "but3";
               		  label = "Button 3";
               		  is_default = false;
              		}
              : button 	{ key = "but6";
               		  label = "Button 6";
               		  is_default = false;
              		}
            	  }
               }
            }
: boxed_row { 
              : button 	{ key = "cancel";
               		  label = "Close";
               		  is_default = true;
               		  is_cancel = true;
              		} 
            }   
}

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes
Message 3 of 4

Anonymous
Not applicable

this time

Again, you helped me.  thank you
0 Likes
Message 4 of 4

scot-65
Advisor
Advisor
There are a few redundancies in DBHunia's code.
Perhaps follow this outline?

First off, the linear direction that the program reads is column.
No need to call out columns except when it comes after a call for a row.

:row {
:column {
:button {}
:button {}
:button {}
}//column
//as an option, one can add a spacer here - making it a 3-column row.
:column {
:button {}
:button {}
:button {}
}//column
}//row
:spacer {height=0.0;}
:button {"cancel" fixed_width=true; alignment=centered;}

By structuring the code as shown above, the buttons will left-align vertically
and each column will show the same width to that of the largest button (that
has the most characters of text); unless one assigns a width to the button(s).

No need to wrap the cancel button with a container ("boxed" or otherwise).
What is shown above will center align to the dialog box but first one needs
to assign the button as having a fixed width, otherwise the button will be
as wide as the dialog.

I work with button widths of 12.0 or 14.0 with a spacer of 1.0 in between
as AutoCAD's built-in ok_cancel does not have equal width buttons.

Concerning when to use or not to use "boxed" column or rows - The simplicity
of your dialog does not warrant the use of boxed rows or columns. By assigning
a label to the row or column, the row or column automatically becomes boxed.

I would suggest using a spacer separating the cancel button from the rest
of the buttons, as shown above. There is only one size that is below a width or
height of 1.0 for a spacer. It is approximately 0.7, and cannot be made smaller.
With this in mind, I typically use values of 0.0 and 1.0 when laying out dialog
tiles.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes