콜백 텍스트의 들여 쓰기나는 테이블 상자 안의 colboxes를 사용하고 있습니다. colbox에는 텍스트 상자가 포함되어있어 전경색과 배경색은 물론 텍스트의 굵은 글씨를 제어 할 수 있습니다. 문제는 텍스트가 텍스트의 왼쪽에 너무 가깝습니다. 다음은 첫 번째 열이 아이콘 상자를 포함하는 colbox이고 두 번째 열이 stringcolbox이고 세 번째 열이 textbox를 포함하는 colbox 인 예제입니다.

나는 아이콘 박스를 움직일 수 있었다. 지위 위에 사용하는 열 << 패딩 (왼쪽 10)) , 그러나 선행 공백이나 2를 샘플 텍스트 칼럼 나는 그것을 오른쪽으로 조금 옮기는 법을 모른다. 그만큼 아이콘 이름 칼럼은 stringcolbox이기 때문에 OK입니다. 코드는 다음과 같습니다.
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 ));
제목 : 텍스트의 들여 쓰기저스틴과 짐 감사합니다. 경계 상자 솔루션은 상당히 깨끗합니다.제목 : 텍스트의 들여 쓰기하나의 빠른 팁. 변수를 추적하고 각 변수에 Padding 변수를 보내는 대신 XPath를 사용하여 ColBox의 모든 IconBox에 패딩을 적용 할 수 있습니다.
이렇게하면 한 줄에 모두 표시됩니다.
(cb << Xpath( "//IconBox" )) << Padding( Left( 10 ) );
제목 : 텍스트의 들여 쓰기ColBox ()의 각 텍스트 상자 () 앞에 H 목록 상자 ()와 스페이서 상자 ()를 추가 할 수 있습니다.

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 ) );제목 : 텍스트의 들여 쓰기나는 각 텍스트 상자 주위에 BorderBox를 놓음으로써 이것을 할 것이다. TextBox를 포함하는 BorderBox를 생성하는 함수를 사용하고 왼쪽 패딩이 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 ));

편집 : t (n) 변수가 BorderBox가되어 현재 코드에서 실수를 수정했습니다.
편집 2 : TextBox 대신 전체 셀을 강조 표시하기 위해 한 번 더 변경했습니다.