Input roll fix crashing on paint and in the designer, the widget now draws a white background, woo!
This commit is contained in:
parent
480520ff6f
commit
88b6699713
|
@ -12,12 +12,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public class InputRoll : Control
|
||||
{
|
||||
private readonly RollColumns _columns = new RollColumns();
|
||||
public InputRoll()
|
||||
{
|
||||
CellPadding = 3;
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
//SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
SetStyle(ControlStyles.SupportsTransparentBackColor, true);
|
||||
//SetStyle(ControlStyles.Opaque, true);
|
||||
this.Font = new Font("Courier New", 8);
|
||||
BackColor = Color.Transparent;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
|
@ -59,7 +63,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// Column data
|
||||
/// </summary>
|
||||
[Category("Behavior")]
|
||||
public RollColumns Columns { get; set; }
|
||||
public RollColumns Columns
|
||||
{
|
||||
get
|
||||
{
|
||||
return _columns;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -154,6 +164,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
|
||||
base.OnPaint(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
this.InputView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.InputView.Columns = null;
|
||||
this.InputView.HorizontalOrientation = false;
|
||||
this.InputView.ItemCount = 0;
|
||||
this.InputView.Location = new System.Drawing.Point(12, 103);
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return;
|
||||
}
|
||||
|
||||
InputView.Refresh();
|
||||
InputView.Invalidate();
|
||||
}
|
||||
|
||||
public void FastUpdate()
|
||||
|
|
Loading…
Reference in New Issue