|
-
March 24th, 2005, 03:11 AM
#5
Re: PropertyGrid doesn't load correct float[] property values
 Originally Posted by Norfy
Does this make any difference?
Code:
[
Browsable(true),
Category("Blend settings")
]
public float[] Directions
{
get
{
return m_directions;
}
set
{
m_directions = value;
Invalidate();
}
}
If not can you post (or email) a complete component?
Same problem. This is my component (a simple Panel):
using System;
using System.ComponentModel;
using System.Collections;
using System.Diagnostics;
namespace WinApp
{
/// <summary>
/// Summary description for MyPanel.
/// </summary>
public class MyPanel : System.Windows.Forms.Panel
{
private float [] m_directions = new float[]{0,0,1};
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public MyPanel(System.ComponentModel.IContainer container)
{
///
/// Required for Windows.Forms Class Composition Designer support
///
container.Add(this);
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public MyPanel()
{
///
/// Required for Windows.Forms Class Composition Designer support
///
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
[
Browsable(true),
Category("Blend settings")
]
public float[] Directions
{
get
{
return m_directions;
}
set
{
m_directions = value;
Invalidate();
}
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|