using System.Drawing;
using System.Drawing.Design;
using System.ComponentModel;
+using System.Threading;
using System.Windows.Forms.Design;
namespace System.Windows.Forms.PropertyGridInternal {
// Grid
DrawGrid(e);
- // Border
- e.Graphics.DrawRectangle(SystemPens.ControlDark, 0,0,Width-1,Height-1 );
-
UpdateScrollBar();
base.OnPaint(e);
int xLoc = SplitterLocation+1;
if (paintsValue) {
- pevent.Graphics.DrawRectangle(ThemeEngine.Current.ResPool.GetPen(Color.Black), SplitterLocation+2,rect.Y+2, 20, row_height-4);
+ pevent.Graphics.DrawRectangle(Pens.Black, SplitterLocation+2,rect.Y+2, 20, row_height-4);
try {
editor.PaintValue(grid_item.Value, pevent.Graphics, new Rectangle(SplitterLocation+3,rect.Y+3, 19, row_height-5));
}
private Rectangle DrawPlusMinus (Graphics g, int x, int y, bool expanded, bool category) {
Rectangle bounds = new Rectangle(x, y, 8, 8);
- if (!category) g.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush(Color.White), bounds);
- g.DrawRectangle (SystemPens.ControlDark, bounds);
- g.DrawLine (SystemPens.ControlDark, x+2, y+4, x + 6, y+4);
+ if (!category) g.FillRectangle (Brushes.White, bounds);
+ Pen pen = ThemeEngine.Current.ResPool.GetPen (property_grid.ViewForeColor);
+ g.DrawRectangle (pen, bounds);
+ g.DrawLine (pen, x+2, y+4, x + 6, y+4);
if (!expanded)
- g.DrawLine (SystemPens.ControlDark, x+4, y+2, x+4, y+6);
+ g.DrawLine (pen, x+4, y+2, x+4, y+6);
return bounds;
}
listBox.MouseUp+=new MouseEventHandler(listBox_MouseUp);
dropdown_form.Controls.Clear();
dropdown_form.Controls.Add(listBox);
- dropdown_form.Location = PointToScreen(new Point(grid_textbox.Location.X,grid_textbox.Location.Y+row_height));
- dropdown_form.Width = grid_textbox.Width;
+ dropdown_form.Location = PointToScreen(new Point(SplitterLocation,grid_textbox.Location.Y+row_height));
+ dropdown_form.Width = this.Width - this.SplitterLocation;
dropdown_form.Show();
}
else { // use editor
}
public void DropDownControl(Control control) {
+ Object queue_id;
+
dropdown_form.Deactivate +=new EventHandler(dropdown_form_Deactivate);
dropdown_form.Size = control.Size;
control.Dock = DockStyle.Fill;
dropdown_form.Controls.Clear();
dropdown_form.Controls.Add(control);
- dropdown_form.Location = PointToScreen(new Point(grid_textbox.Location.X,grid_textbox.Location.Y+row_height));
- dropdown_form.Width = grid_textbox.Width;
+ dropdown_form.Location = PointToScreen(new Point(SplitterLocation,grid_textbox.Location.Y+row_height));
+ dropdown_form.Width = Width - SplitterLocation;
dropdown_form_showing = true;
dropdown_form.Show();
System.Windows.Forms.MSG msg = new MSG();
- while (XplatUI.GetMessage(ref msg, IntPtr.Zero, 0, 0) && dropdown_form_showing) {
+ queue_id = XplatUI.StartLoop(Thread.CurrentThread);
+ while (XplatUI.GetMessage(queue_id, ref msg, IntPtr.Zero, 0, 0) && dropdown_form_showing) {
XplatUI.TranslateMessage(ref msg);
XplatUI.DispatchMessage(ref msg);
}
#endregion
- #region DropDownForm Class
- #endregion DropDownForm Class
-
#region Internal Classes
internal class ITypeDescriptorContextImpl : System.ComponentModel.ITypeDescriptorContext {
private PropertyGrid property_grid;