Change Document Width and Height


Author
Message
Volvick Derose
Volvick Derose
Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)Forum Guru (71 reputation)
Group: Forum Members
Posts: 71, Visits: 1
I couldn't find a way to change the document width and height from another diagram.

I am using another dialog, when a user calls it, the user will enter the document width and height then that dialog will update form1. You can assume the dialog is form2.

In form2, I do something like that

public NDrawingDocument DocumentSetting {get; set;}

then I have OnOK

DocumentSetting.Width = Convert.ToSingle(spinEdit1.Value);
DocumentSetting.Height = Convert.ToSingle(spinEdit2.Value);

In form1, I call form2 like

new Form2(this.nDrawingDocument1);

Does not work
Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
The mistake you have made is that in your form's constructor you assign the property to the passed parameter. It should be exactly the opposite ! Assign the parameter to the property, i.e.: DocumentSetting = selectedDocument

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search