Sangría del texto COLBOXEstoy usando colboxes dentro de un tablebox. Los colboxes contienen un conjunto de cuadros de texto, lo que me permite controlar el color de fondo y de fondo, así como el texto en negrita. El problema es que el texto está demasiado cerca del lado izquierdo de su columna. Aquí hay un ejemplo donde la primera columna es un colbox que contiene cuadros de iconos, el segundo es stringcolbox y el tercero un colbox que contiene cuadros de texto:

Pude mover las cajas de iconos en el Estado columna sobre el uso de << relleno (izquierda10) , pero aparte de agregar uno o dos espacios iniciales a la Texto de ejemplo Columna No sé cómo moverla un poco hacia la derecha. los Nombre icónico la columna está bien, ya que es un stringcolbox. Aquí está el código:
nw = new window("Test Col Box Justification",
tb = table box(
cb = col box("Status",
i1 = icon box("Go"),
i2 = icon box("DebuggerRunWithoutBreakpoints"),
i3 = icon box("Locked"),
i4 = icon box("WinRelaunchAnalysis"),
i5 = icon box("Excluded"),
i6 = icon box("SASTableMeta"),
i7 = icon box("ColStack"),
i8 = icon box("DataTableBox"),
i9 = icon box("WinFileNewDT"),
i10 = icon box("SASExportData"),
),
sb = string col box("Icon Name", {"Go", "DebuggerRunWithoutBreakpoints",
"Locked", "WinRelaunchAnalysis", "Excluded", "SASTableMeta", "ColStack",
"DataTableBox", "WinFileNewDT", "SASExportData"}),
tcb = col box("Sample Text",
t1 = text box("The"),
t2 = text box("quick"),
t3 = text box("red"),
t4 = text box("fox"),
t5 = text box("jumped"),
t6 = text box("over"),
t7 = text box("the"),
t8 = text box("oak"),
t9 = text box("brown"),
t10 = text box("log"),
),
)
);
t1 << font color(51) << Set Font Style("Bold") << background color(73);
t3 << font color(51);
t9 << font color(54);
tb << set underline headings(1) << set column borders(1) << set row borders(1) << set shade alternate rows(1);
i1 << Padding( Left( 10 )); i2 << Padding( Left( 10 ));
i3 << Padding( Left( 10 )); i4 << Padding( Left( 10 ));
i5 << Padding( Left( 10 )); i6 << Padding( Left( 10 ));
i7 << Padding( Left( 10 )); i8 << Padding( Left( 10 ));
i9 << Padding( Left( 10 )); i10 << Padding( Left( 10 ));
Re: Indentación del texto COLBOXGracias Justin y Jim. La solución de la caja del borde es bastante limpia.Re: Indentación del texto COLBOXUn consejo rápido. Puede aplicar el relleno a todos los IconBoxes en el ColBox usando XPath en lugar de realizar un seguimiento de las variables y enviar las variables de relleno a cada una.
Esto lo hace todo en una línea:
(cb << Xpath( "//IconBox" )) << Padding( Left( 10 ) );
Re: Indentación del texto COLBOXpuede agregar un cuadro de lista H () y un cuadro espaciador () delante de cada cuadro de texto () en el cuadro de control ().

nw = New Window( "Test Col Box Justification",
tb = Table Box(
cb = Col Box(
"Status",
i1 = Icon Box( "Go" ),
i2 = Icon Box( "DebuggerRunWithoutBreakpoints" ),
i3 = Icon Box( "Locked" ),
i4 = Icon Box( "WinRelaunchAnalysis" ),
i5 = Icon Box( "Excluded" ),
i6 = Icon Box( "SASTableMeta" ),
i7 = Icon Box( "ColStack" ),
i8 = Icon Box( "DataTableBox" ),
i9 = Icon Box( "WinFileNewDT" ),
i10 = Icon Box( "SASExportData" ),
),
sb = String Col Box( "Icon Name",
{"Go", "DebuggerRunWithoutBreakpoints", "Locked", "WinRelaunchAnalysis", "Excluded",
"SASTableMeta", "ColStack", "DataTableBox", "WinFileNewDT", "SASExportData"}
),
tcb = Col Box(
"Sample Text",
H List Box( Spacer Box( size( 5, 0 ) ), t1 = Text Box( "The" ) ),
t2 = Text Box( "quick" ),
t3 = Text Box( "red" ),
t4 = Text Box( "fox" ),
t5 = Text Box( "jumped" ),
t6 = Text Box( "over" ),
t7 = Text Box( "the" ),
t8 = Text Box( "oak" ),
t9 = Text Box( "brown" ),
t10 = Text Box( "log" ),
),
)
);
t1 << font color( 51 ) << Set Font Style( "Bold" ) << background color( 73 );
t3 << font color( 51 );
t9 << font color( 54 );
tb << set underline headings( 1 ) << set column borders( 1 ) << set row borders( 1 ) <<
set shade alternate rows( 1 );
i1 << Padding( Left( 10 ) );
i2 << Padding( Left( 10 ) );
i3 << Padding( Left( 10 ) );
i4 << Padding( Left( 10 ) );
i5 << Padding( Left( 10 ) );
i6 << Padding( Left( 10 ) );
i7 << Padding( Left( 10 ) );
i8 << Padding( Left( 10 ) );
i9 << Padding( Left( 10 ) );
i10 << Padding( Left( 10 ) );Re: Indentación del texto COLBOXLo haría colocando un BorderBox alrededor de cada uno de los cuadros de texto. He actualizado su ejemplo para usar una función para generar el BorderBox que contiene un TextBox y tiene un relleno izquierdo de 10.
borderedText = Function( {txt},
Border Box( Left( 10 ), Text Box( txt ) )
);
nw = new window("Test Col Box Justification",
tb = table box(
cb = col box("Status",
i1 = icon box("Go"),
i2 = icon box("DebuggerRunWithoutBreakpoints"),
i3 = icon box("Locked"),
i4 = icon box("WinRelaunchAnalysis"),
i5 = icon box("Excluded"),
i6 = icon box("SASTableMeta"),
i7 = icon box("ColStack"),
i8 = icon box("DataTableBox"),
i9 = icon box("WinFileNewDT"),
i10 = icon box("SASExportData"),
),
sb = string col box("Icon Name", {"Go", "DebuggerRunWithoutBreakpoints",
"Locked", "WinRelaunchAnalysis", "Excluded", "SASTableMeta", "ColStack",
"DataTableBox", "WinFileNewDT", "SASExportData"}),
tcb = col box("Sample Text",
t1 = borderedText("The"),
t2 = borderedText("quick"),
t3 = borderedText("red"),
t4 = borderedText("fox"),
t5 = borderedText("jumped"),
t6 = borderedText("over"),
t7 = borderedText("the"),
t8 = borderedText("oak"),
t9 = borderedText("brown"),
t10 = borderedText("log"),
),
)
);
t1 << background color(73);
t1[Text Box(1)] << font color(51) << Set Font Style("Bold");
t3[Text Box(1)] << font color(51);
t9[Text Box(1)] << font color(54);
tb << set underline headings(1) << set column borders(1) << set row borders(1) << set shade alternate rows(1);
i1 << Padding( Left( 10 )); i2 << Padding( Left( 10 ));
i3 << Padding( Left( 10 )); i4 << Padding( Left( 10 ));
i5 << Padding( Left( 10 )); i6 << Padding( Left( 10 ));
i7 << Padding( Left( 10 )); i8 << Padding( Left( 10 ));
i9 << Padding( Left( 10 )); i10 << Padding( Left( 10 ));

Editar: Se corrigió un error en mi código debido a que las variables t (n) ahora son BorderBox.
Edición 2: realizó un cambio más para resaltar la celda completa en lugar de solo el TextBox.