SharpUI for .NET Support

Started by sandyw at 02-18-2008 6:17 AM. Topic has 2 replies.

Print Search Rate
Sort Posts:    
   02-18-2008, 6:17 AM
sandyw is not online. Last active: 1/20/2010 12:12:22 PM sandyw

Not Ranked
Joined on 08-28-2004
Posts 8
ListView and List Items
Hello,

I'm afraid I have absolutely no idea how you use the ListTool in c# and Sharpui v1.4

I have added a list view item to the menu bar and it shows up in the menu as ListTool1.

My first question is, there are also list items, what are they, how do I create them in code and how do I show them. Is there a way of checking which one has been clicked.

Second question, When I create the listitems in the desgner they still don't show up. Why not, where do I go to display them and where are they displayed.

If I want to create items for a user to select in a menu do I create several ListViews or do I create one list view and several ListItems?

Are there any Examples of using the LsitView anywhere?

Thank you in advance for your help

Sandyw
   Report 
   02-18-2008, 12:57 PM
ericc is not online. Last active: 4/4/2009 4:32:14 PM ericc

Top 10 Posts
Joined on 03-01-2005
Posts 1,857

DDStaff
Re: ListView and List Items

Attachment: listView.zip
Thank you for your questions. I will answer your questions in the order which they were presented.

1)    You can create list items programmatically by adding a new list item to the Tools Items collection.
Ex:
this.listTool1.Items.Add(new DataDynamics.SharpUI.Toolbars.ListItem("New Item in the List"));

(Link to code sample)
http://www.datadynamics.com/Help/SharpUI/SharpUI.Toolbars~DataDynamics.SharpUI.Toolbars.ListTool.html

Also, you can use the ListTools click event to determine what item was clicked by casting the sender as DataDynamics.SharpUI.Toolbars.Tool.

Ex:
private void listTool1_Click(object sender, System.EventArgs e)
{
    Console.WriteLine(((DataDynamics.SharpUI.Toolbars.Tool)sender).Text);
}

2)    You can determine how list items are displayed by setting the CaptionStyle and DisplayAs properties of the ListTool.
 
3)    Unfortunately, we do not have any samples demonstrating the use of a list tool, however, you can find a code snippet contained in the previous link as well as a small sample attached.

Thanks,
    Eric


   Report 
   02-19-2008, 9:03 AM
sandyw is not online. Last active: 1/20/2010 12:12:22 PM sandyw

Not Ranked
Joined on 08-28-2004
Posts 8
Re: ListView and List Items
Hello Ericc,

Thank you very much for your help.

It has cleared up the questions that I had. It's now a case of trying it.

Again

Thank You,

Sandyw
   Report 
GrapeCity » Product Support » SharpUI for .NE... » ListView and List Items

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.