1 Attachment(s)
Please help with resizing DataGrid
I have decided to make an Array editor using the DataGrid object. Unfortunately, it seems to not resize properly. I have code that is supposed to resize the DataGrid horizontally based on the (Number of columns)*(Width of each column) and vertically based on the (number of lines)*(Height of each line). For some reason, this results in a DataGrid with a scrollbar and some empty background color generated as padding on the DataGrid. The actual DataGrid is being resized, but it isn't actually cropped to the cells I have created.
Can someone take a look and point out where I am going wrong here? I am guessing it is just my lack of understanding how Windows controls behave.
There is a sample array file also attached so you can load it and see the bug in action.