@Petras wrote:
Hi,
I have a window form once I double click on the component.
On the windows form I have a track bar - "slider".I want to pass value to component from that track bar instantly without pressing update each time.
Is it possible to do so?
I understand that to pass a value from windows form to grasshopper component, I need to write if statement for checking if dialogResult is ok or other state , that requires pressing a windows form button. But is it possible to pass a value without this if statement, or update information live? For instance once I release mouse button or when the track bar value is changed? I attached component and windows form .cs files.
Thank you very much,
Petraspublic void DisplayForm() { Utilities.CurvatureAnalysis frm = new Utilities.CurvatureAnalysis(); Grasshopper.GUI.GH_WindowsFormUtil.CenterFormOnCursor(frm,true); if (frm.ShowDialog() == DialogResult.OK) { //Harvest values from form and assing them to local variables mPetras = frm.messageForPetras; } this.ExpireSolution(true); }
Posts: 16
Participants: 2