473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Byte array in PropertyGrid

I have a C# Form with a System.Windows.Forms.PropertyGrid(). This uses a
Datagram class, implemented in both C# and C++:

// C#
public class Datagram
{
public byte[] _Buffer;

// some code...

public byte[] Buffer { get{return _Buffer;}
}

// C++
public __gc class Datagram
{
public:

unsigned char* _ucharBuf;
Byte _ByteBuf __gc[];

// some code...

public:
__property byte* get_Buffer1() {return _ucharBuf;}
__property Byte get_Buffer2() __gc[] {return _ByteBuf;}
__property unsigned char __gc *get_Buffer3() {return _ucharBuf;}
}

When I use the C# Datagram class, the Property Grid looks like this:

+ Buffer Byte[] Array ...

The "Byte Array Property Editor" is available when ... is clicked.

When I use the C++ datagram class, Property Grid looks like this:

Buffer1 System.Reflection.Pointer
+Buffer2 Byte[] Array
Buffer3 Specified method is not supported.

I assume the C++

__property Byte get_Buffer2() __gc[]

is the best match for the C# equivalent.

The "Byte Array Property Editor" seems to be unavailable when I use the C++
class. How can I get the C++ class to be compliant with the C# class?


Nov 16 '05 #1
0 2782

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Terry | last post by:
I have a very basic program, but for some reason I can't get it to behave properly. What I want is a basic form with a TabControl that fills the entire form. The tab control should have 4 tabs...
3
by: Pol Bawin | last post by:
Hi All, One : I have a property that get/set a array of an abstract class A By default my array is null In the propertygrid, It is not works correctly when my array is null. (when my array...
0
by: ALI-R | last post by:
I have an array of an object (object has two properties,Name and Value) ,,,I want to let user edit the values ,so I decided to feed this array to a PropertyGrid but I don;t know how to make the ...
7
by: siddhiash | last post by:
Hi Friends I want to add PasswordChar Property which shows ****** for string which I type in PropertyGrid Control. Regards, Siddharth
8
by: ljlevend2 | last post by:
If a property's type is an array and the property is exposed in a PropertyGrid, then the property can be expanded so that the user can view and edit the array elements. But, I've noticed that if...
6
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
4
by: Steve | last post by:
I am using a property grid to display a classes properties, all is OK for single value properties but i need to display a list of strings for the user to select from and update the property value...
4
by: phcmi | last post by:
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set configuration settings in our application, so...
3
by: =?Utf-8?B?U3RldmVU?= | last post by:
Is it possible to hide a row within a PropertyGrid based upon the boolean value of another row within the PropertyGrid? I am using VS2005 with .NET Frameworks 2.0. -- ----------- Thanks,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.