|
The second one is what I wanted, thanks.
/\ |_ E X E GG
|
|
|
|
|
I must say once again, Thanks. This nice example you set up for my question really helped me out today.
Good Man.
/\ |_ E X E GG
|
|
|
|
|
I need to embedd a treeview inside each row of a listview. and be able to have row sizes only per row to accomadate the listview.
Does anyone know of any articles on this?
thanks,
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
There's two articles here on CP on exactly this subject, look them up under C# Controls.
|
|
|
|
|
I got below error message when I try to run my application on a Win2000 system with .netframework 1.1 installed.
Application has generated an exception that could not be handled.
No debugger found.
Registered JIT debugger is not available.
An attempt to launch a JIT debugger with the following command resulted in an error code of 0x2(2) . Please check computer settings.
cordbg.exe ! a 0x724.
Pls help me. Thanks a lot for your replying.
Thanks.
coby
|
|
|
|
|
The VS errlook.exe util says this about error 0x724:
Incompatible version of the serializing package.
This seems to hint at problems with either the Object or XMl serializers - check if there's been any changes with the type you are using between framework versions.
Also, try wrapping the code in you Main class in a try{} catch{} group so you can get more meaningful error messages. For example:
[STAThread]
static void Main(string[] args)
{
try
{
Form1 main = new Form1();
main.Show();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), ex.Message);
}
}
|
|
|
|
|
Thank you very much for the response. I did add the code in the project. And then I got below message.
System.Security.SecurityException: Request for the permission of type
System.Data.SqlClient.SqlClientPermission,System.Data, Version= 1.0.5000.0, Culture= neutral,
PublickeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet,PermissionSet deniedSet, CodeAccessPermission demand,PermissinToken permToken,
.....
It seems that I can't get the permission to access Sql server. Could you pls tell me how to resolve this issue?
Thanks.
coby
|
|
|
|
|
When you add a visible control to a form in VS.NET, such as a textbox, the Properties box shows several properties with sub-properties. For example, the Font, Location, and Size properties have a [+] next to them which you can click to reveal sub-properties.
I'm now creating a custom control myself for which I want add a property with sub-properties. How is that done? Is there an example I can look at somewhere?
I really appreciate your help,
Alvaro
If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
|
|
|
|
|
Bending the PropertyGrid to Your Will[^] by Tony Allowatt. It's an excellent article, well worth reading.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I spent some time reading the article but unfortunately it didn't have what I needed with respect to custom controls. However, thanks to one of the "Other Article" links at the bottom of that article, I ran into the solution from one[^] of the comments made on it.
Thanks for pointing me in the right direction.
Regards,
Alvaro
If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
|
|
|
|
|
Alvaro Mendez wrote:
I'm now creating a custom control myself for which I want add a property with sub-properties. How is that done? Is there an example I can look at somewhere?
I really appreciate your help,
This is done with attributes, here is an example where using the same Category attribute's name will cause the Color property and the String property to be grouped under Options (note each property has it's own Description ). Hope this helps.
internal class Properties
{
[Category("Options"),
Description("The color of the header on main form at top.")]
public Color Color
{
get{return _color;}
set{_color = value;}
}
[Category("Options"),
Description("Some string used in the app.")]]
public String String
{
get{return _s;}
set{_s = value;}
}
private Color _color;
private String _s;
}
-Nick Parker
|
|
|
|
|
I don't think so. You didn't understand the question
And I don't know the answer!
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Meisi wrote:
You didn't understand the question
Ummm, yes I did.
Meisi wrote:
And I don't know the answer!
Read my previous post again.
-Nick Parker
|
|
|
|
|
Meisi wrote:
You didn't understand the question
Nick Parker wrote:
Ummm, yes I did.
Why didn't you answer it, then...;)
|
|
|
|
|
Arjan Einbu wrote:
Why didn't you answer it, then.
Oppps, my mistake. Guess I need some
-Nick Parker
|
|
|
|
|
Nick Parker wrote:
Ummm, yes I did.
Actually no Nick. I was referring to Sub-Properties not Categories. Take a look at the Font property. It's already under the "Appearance" category, but it also has its own set of properties.
Thanks anyway, and here's[^] the solution in case you're interested.
Regards,
Alvaro
If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
|
|
|
|
|
Alvaro Mendez wrote:
Actually no Nick. I was referring to Sub-Properties not Categories. Take a look at the Font property. It's already under the "Appearance" category, but it also has its own set of properties.
Again, opps, sorry I did mis-understand what you initially meant.
-Nick Parker
|
|
|
|
|
Nick Parker wrote:
I did mis-understand
hehe! you see? you didn't corrctly understand the question!
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
Meisi wrote:
hehe! you see? you didn't corrctly understand the question!
That's ok, I do now.
-Nick Parker
|
|
|
|
|
|
i dont have vs.net on this machine to try it out, but have you noticed that all of the properties that have the sub properties, are objects that have properties, e.g. Size has the properties Width and Height in it. Try grouping the properties that you want grouped in the designer into a seperate object, and use that as a property, and it may do the trick, but i dont know.
Another Post by NnamdiOnyeyiri l Website
|
|
|
|
|
Thanks Nnamdi. You're correct that these properties need to be grouped into a separate class. But that alone does not do it. Check out the solution[^]. It's amazingly simple.
Regards,
Alvaro
If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
|
|
|
|
|
I found the solution in this[^] comment from Gerd Klevesaat.
Regards,
Alvaro
If you want to get to the top, prepare to kiss a lot of bottom. -- despair.com
|
|
|
|
|
Hi anyone have a short code snippet of adding a sub item in the detail view, i direly need this
and the below doesnt work
listView1.View = View.Details;
// Allow the user to edit item text.
listView1.LabelEdit = true;
// Allow the user to rearrange columns.
listView1.AllowColumnReorder = true;
// Display check boxes.
listView1.CheckBoxes = true;
// Select the item and subitems when selection is made.
listView1.FullRowSelect = true;
// Display grid lines.
listView1.GridLines = true;
// Sort the items in the list in ascending order.
listView1.Sorting = SortOrder.Ascending;
// Create three items and three sets of subitems for each item.
ListViewItem item1 = new ListViewItem("item1",0);
// Place a check mark next to the item.
item1.Checked = true;
item1.SubItems.Add("1");
item1.SubItems.Add("2");
item1.SubItems.Add("3");
ListViewItem item2 = new ListViewItem("item2",1);
item2.SubItems.Add("4");
item2.SubItems.Add("5");
item2.SubItems.Add("6");
ListViewItem item3 = new ListViewItem("item3",0);
// Place a check mark next to the item.
item3.Checked = true;
item3.SubItems.Add("7");
item3.SubItems.Add("8");
item3.SubItems.Add("9");
// Create columns for the items and subitems.
listView1.Columns.Add("Item Column", 100, HorizontalAlignment.Left);
listView1.Columns.Add("Column 2", 100, HorizontalAlignment.Left);
listView1.Columns.Add("Column 3", 100, HorizontalAlignment.Left);
listView1.Columns.Add("Column 4", 100, HorizontalAlignment.Center);
//Add the items to the ListView.
listView1.Items.AddRange(new ListViewItem[]{item1,item2,item3});
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
straight from msdn....
ListViewItem listViewItem1 = new ListViewItem(new string[] {"Banana","a","b","c"}, -1, Color.Empty, Color.Yellow, null);<br />
ListViewItem listViewItem2 = new ListViewItem(new string[] {"Cherry","v","g","t"}, -1, Color.Empty, Color.Red, new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((System.Byte)(0))));<br />
ListViewItem listViewItem3 = new ListViewItem(new string[] {"Apple","h","j","n"}, -1, Color.Empty, Color.Lime, null);<br />
ListViewItem listViewItem4 = new ListViewItem(new string[] {"Pear","y","u","i"}, -1, Color.Empty, Color.FromArgb(((System.Byte)(192)), ((System.Byte)(128)), ((System.Byte)(156))), null);<br />
<br />
this.listView1 = new ListView();<br />
<br />
this.listView1.Sorting = SortOrder.None;<br />
this.listView1.View = View.Details;<br />
this.listView1.Columns.Add(new ColumnHeader());<br />
this.listView1.Columns[0].Text = "Column 1";<br />
this.listView1.Columns[0].Width = 100;<br />
listView1.Columns.Add(new ColumnHeader());<br />
listView1.Columns[1].Text="Column 2";<br />
listView1.Columns.Add(new ColumnHeader());<br />
listView1.Columns[2].Text="Column 3";<br />
listView1.Columns.Add(new ColumnHeader());<br />
listView1.Columns[3].Text="Column 4";<br />
this.SuspendLayout();<br />
this.listView1.Items.AddRange(new ListViewItem[] {listViewItem1,<br />
listViewItem2,<br />
listViewItem3,<br />
listViewItem4});<br />
this.listView1.Location = new Point(10, 10);<br />
this.listView1.Name = "listView1";<br />
this.listView1.Size = new Size(300, 100);<br />
this.listView1.TabIndex = 0;<br />
this.listView1.LabelEdit = true;<br />
this.listView1.ColumnClick += new ColumnClickEventHandler(ColumnClick);<br />
<br />
this.AutoScaleBaseSize = new Size(5, 13);<br />
this.ClientSize = new Size(400, 400);<br />
this.Controls.AddRange(new Control[] {this.listView1});<br />
this.Name = "ListViewSortForm";<br />
this.Text = "Sorted ListView Control";<br />
this.ResumeLayout(false);<br />
}<br />
hope it helps.
Csharp™ the coder formally known as dynamic
Me.twins.duedate = DateTime.Now.AddDays(+16).ToLongDateString Me.Birthday = DirectCast(Me.twins.DueDate, DateAndTime.SameDay)
|
|
|
|
|