목록 상자 내의 특정 항목에서 글꼴 색상을 제어하는 독창적 인 방법이 있습니까? 목록 상자의 전체 목록에 글꼴 색상을 보내는 방법을 알고 있지만 목록의 단일 항목에 적용 할 수 있는지 궁금합니다.
thx, DJ
테이블 상자 안에 열 상자를 사용하면 다른 색상을 얻을 수 있습니다. 비슷하게 보입니다-여기 예가 있습니다.
n1_list = [1, 2, 3, 4];
c1_list = {"XXX", "YYY", "ZZZ", "WWW"};
tb_list = {};
cb = col box("String1");
for (i = 1, i <= nitems(c1_list), i++,
tb_list[i] = text box(c1_list[i]);
cb << append(tb_list[i]);
);
// Change the color of the third item
tb_list[3] << font color("Red");
nw = new window("Test Color Listbox",
tb = table box(
number col box("Index", n1_list),
cb
)
);
tb << Set Selectable Rows(1);
tb << set row change function(
Function( {this},
row_list = this << get selected rows;
if (nrows(row_list) > 0,
one_row = row_list[1];
show(one_row, c1_list[one_row]);
);
);
);