In my program, there are two controls – native TreeView and managed DataGridView. I want to set the RowsHeight property for the DataGridView with TreeView item height, but unfortunately the TreeView don’t have an option to retrive the height. Then I tried to use GetTextMetric function and set the RowsHeight to the tmHeight value. Unfortunately it’s still don’t work – the height of the DataGridView items is bigger than the TreeView ones.
In my program, there are two controls – native TreeView and managed DataGridView. I
Share
Send the
TVM_GETITEMHEIGHTmessage to the control to get the item height.