algorithmic modeling for Rhino
Hi,
this question is related to another discussion about windows forms.
when rhino window is minimized or maximized the GH document also minimized and maximized, other words listens to (Rhino) parent window. If I am not wrong, GH document Editor is either a child window of the Rhino doc or gh doc is owned by rhino window !
I have a custom gh component that implements a windows form. The form is minimized/maximized when GH document editor is minimized.maximized but it stays up when Rhino document is minimized/maximized.
Is there any way that the form of GH component can also listens the Rhino window states ?
I have tested a few things, but didn't seem to work ! Try to set Mdi (multiple document interface)
m_form.MdiParent = Grasshopper.Instances.DocumentEditor.ParentForm;
m_form.Show(Grasshopper.Instances.DocumentEditor); // this sets form's owner !
Thank you,
Tags:
You should use m_form.Show(Grasshopper.Instances.DocumentEditor); that is the correct way. MDI is not relevant here. Additionally, you can register your form with the FormShepard on the main Grasshopper window, it will take care of moving and minimizing:
Grasshopper.Instances.DocumentEditor.FormShepard.RegisterForm(m_form);
--
David Rutten
david@mcneel.com
David,
Is there a plan to support WPF based Shepard? I am currently using Andrew Heuman's implementation for managing window ownership, but it would be nice to have GH handle that.
Cheers!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 1 Comment 0 Likes
© 2024 Created by Scott Davidson. Powered by