5 writes to parent
System.Windows.Forms (5)
winforms\Managed\System\WinForms\ToolBar.cs (5)
1165button.parent = this; 1230buttons[index].parent = null; 1233buttons[index].parent = this; 1383buttons[x].parent = this; 1418buttons[index].parent = null;
34 references to parent
System.Windows.Forms (34)
winforms\Managed\System\WinForms\ToolBarButton.cs (34)
108if ((owner != null) && (owner.parent != null)) { 109return owner.parent.ImageList; 172if (parent != null && parent.IsHandleCreated) { 173parent.SendMessage(NativeMethods.TB_ENABLEBUTTON, FindButtonIndex(), 267return parent; 283if (parent == null || !parent.IsHandleCreated) 286if ((int)parent.SendMessage(NativeMethods.TB_ISBUTTONINDETERMINATE, FindButtonIndex(), 0) != 0) 312if (parent == null || !parent.IsHandleCreated) 333if (parent != null) { 335UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc); 467Debug.Assert(parent != null, "Parent should be non-null when button width is requested"); 477using (Graphics g = this.parent.CreateGraphicsInternal()) { 479Size buttonSize = this.parent.buttonSize; 484if (this.parent.ImageList != null || !String.IsNullOrEmpty(Text)) { 485Size imageSize = this.parent.ImageSize; 486Size textSize = Size.Ceiling(g.MeasureString(Text, parent.Font)); 487if (this.parent.TextAlign == ToolBarTextAlign.Right) { 499if (style == ToolBarButtonStyle.DropDownButton && this.parent.DropDownArrows) { 504width = this.parent.ButtonSize.Width; 523if (parent != null) { 526parent.Buttons.RemoveAt(index); 539for (int x = 0; x < parent.Buttons.Count; x++) { 540if (parent.Buttons[x] == this) { 569if ((int)parent.SendMessage(NativeMethods.TB_ISBUTTONCHECKED, FindButtonIndex(), 0) != 0) { 749if (style == ToolBarButtonStyle.DropDownButton && parent != null && parent.DropDownArrows) { 760if (updatePushedState && parent != null && parent.IsHandleCreated) { 763if (parent != null) { 766parent.InternalSetButton(index, this, recreate, updateText);