Here's an update. The resize bar is now drawn correctly (I needed to set the Text and MinSize properties on the Form I display. Any clue, anyone?). You still can't drag the splitter to the left as described below.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan S. Chambers Sent: Tuesday, April 19, 2005 10:22 AM To: [email protected] Cc: [EMAIL PROTECTED] Subject: [Mono-winforms-list] Splitter I use the splitter in the property grid control, and made a few changes to it. Most importantly, instead of resizing the controls as the splitter is dragged, I display a bar on top of the controls (how MS SWF does it) indicating the position and only resize the controls when the mouse button is released. It works well running against .Net, but it has a few idiosyncrasies with Mono. 1. In horizontal mode, the splitter works well except that the bar is not drawing correctly (some sort of painting issue). 2. In vertical mode, the splitter works fine moving to the right, but not to the left (when docked to the left). This appears to be a MouseMove event issue though. When moving to the left past the original position of the splitter, the mouse event args start out good (they become negative), but after moving slightly to the left of the splitter's original position, the mouse event args values become large (63546 or some number like that, perhaps some sort of signed/unsigned issue?). 3. There are some other smaller issues, but the control seems to behave slightly better than before since it doesn't try to resize the controls every time the mouse moves. (Drawing the bar indicating the position took a while to figure out. On windows, MS probably gets the DC to the desktop and draws on it. I know of no cross platform way to do that. I tried handling the splitter's siblings paint event, and drawing the bar on each control. That didn't work. Currently, I create a form with no border and with a checkerboard pattern background. I move this with the mouse moves) It's not perfect, but it helped me in my work on the propertygrid. Give it a try and let me know if you want me to check in the changes, etc. - Jonathan
Splitter.cs
Description: Splitter.cs
