private void UpdateNodeLayout() { NodeLayout.ClearLayout(); while (pnlNodes.Controls.Count > 0) { pnlNodes.Controls[0].Dispose(); pnlNodes.Controls.RemoveAt(0); } var oddNode = true; foreach (var node in Parent.Nodes) { if (oddNode) { NodeLayout.BeginRow(); } var checkBox = new CheckBox { Text = node.Text, Checked = DomainLink.Nodes.Contains(node), Tag = node }; NodeLayout.AddControl(checkBox); if (!oddNode) { NodeLayout.EndRow(); } oddNode = !oddNode; } if (!oddNode) { NodeLayout.EndRow(); } NodeLayout.ProcessLayout(); Apex.ControlUtil.ShowScrollBar(pnlNodes.Handle, Apex.ControlUtil.ScrollBarDirection.Horizontal, false); }