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