Discussions
Sign In
•
Register
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In with LMD account
Sign In with LMD account
Categories
Recent Discussions
Categories
All Categories
1.1K
NG Controls
28
Announcements
60
LMD IDE-Tools
208
LMD ElPack
373
LMD-Tools
414
Feature Requests
38
In this Discussion
Victor_Bocharov
May 2013
TElXTree with TElXCellCheckBox.Create(): Centering in Cell?
RaymondWK
May 2013
edited May 2013
in
LMD ElPack
Vote Up
0
Vote Down
Is it possible centre the TElXCellCheckBox in the cell.
I have tried using left justification for the caption and adding some spaces to simulate it, but the checkbox disappears.
Thanks.
Raymond
Comments
2 Comments
sorted by
Votes
Date Added
Victor_Bocharov
May 2013
edited May 2013
Posts: 0
Accepted Answer
Vote Up
0
Vote Down
Hi Raymond,
Use code like in this snippet:
with ElXTreeControls do
for i:=0 to Items.Count-1 do
begin
Items[i].Cells[c-1].UseOwnStyle := true;
Items[i].Cells[c-1].Style.Control := TElXCellCheckBox.Create;
TElXCellCheckBox(Items[i].Cells[c-1].Style.Control).Alignment := taCenter;
Items[i].Cells[c-1].Text := '';
Items[i].Cells[c-1].Control.OnClick := CellCBClicked;
(Items[i].Cells[c-1].Control as TElXCellCheckBox).AllowGrayed := true;
end;
Sign In
or
Register
to comment.
Comments