|
Are you familiar with generic lists, such as List< Button> or the old ArrayList?
If not, I suggest you read up on them, you won't use many arrays once you understand them.
They behave pretty much like a stretchable array, they can grow and shrink, you don't have to know
the size when you create them, and you can use an index on them as if they were arrays (internally
they are).
|
|
|
|
|
Hi,
if you are listing something (possibly with an unknown count), then want to operate on a subset of the
listed items, I would look at some of the listing Controls, ListBox is the first candidate.
Choose its SelectionMode appropriately and provide a single Button to operate on the selected items.
|
|
|
|
|
yeah i understand that a listbox or a combo box will be good for it
but unfortunately it must be buttons as its easier to click and its a requirement
|
|
|
|
|
Your app could react on a ListBox click too (effectively turning the entire row into one big button);
and you can always disable (or undo) selection mechanisms, if you don't need them.
|
|
|
|
|
Hi all,
I am creating labels at runtime and adding into panel.
I wants to create MouseHover Event to Label at runtime
For that i tried in following way.
But its giving Error "No Overload method 'lbl_MouseHover' matches to delegate 'System.EventHandler"..
for (int i = 1; i < 10; i++)
{
Label lbl = new Label();
lbl.AllowDrop = true;
lbl.Size = new Size(50, 16);
lbl.TextAlign = ContentAlignment.MiddleLeft;
lbl.ImageAlign = ContentAlignment.MiddleLeft;
lbl.Name ="lbl_" +i.ToString();
pnl.Controls.Add(lbl);
lbl.MouseHover +=new EventHandler(lbl_MouseHover); //Error
}
public void lbl_MouseHover(object sender, MouseEventArgs e)
{
}
please suggest me where i did wrong.......
Thanks in advance
|
|
|
|
|
sekhar.k wrote: public void lbl_MouseHover(object sender, MouseEventArgs e)
MouseEventArgs EventArgs
Thats it.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
Thanks for your suggestion.
Its worked...
|
|
|
|
|
Hi all,
I have a requirement of displaying both image and text in a single cell of DataGridview(Windiws Application).
Is this possible ,if yes please suggest me how to approach....
Thanks in advance
cheers,
sekhar
|
|
|
|
|
1. Provide padding in the TextboxColumn and then draw the image in the space created in the column using OnPaint.
2. Create your own datagridview column using the existing datagridviewtextboxcolumn class.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
modified on Thursday, January 8, 2009 9:56 AM
|
|
|
|
|
Thanks for your suggestion
|
|
|
|
|
I want to Invoke a Web Service using Visual C++ .NET. Please provide me with information.
I have sample code to invoke web service using c#. The web service method has complex data as input. Please reply.
|
|
|
|
|
|
how to we get nodes(nodes maybe child or parent) with a specified letter in treeview control.
thanks.
|
|
|
|
|
Just iterate (recursively) through the nodes.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Another way is to use AsQueryable method on the Nodes collection and the use Linq to search the nodes matching your criteria.
|
|
|
|
|
I am trying to show a tooltip on the form.
I tried using the line:
tooltip.SetToolTip(this, this.Text);
I can see the tooltip on the form but not on the header of the form. Is there any way to show it also there ?
I will be glad to get the code for it.
Thanks, Ido
Report post as abusive
|
|
|
|
|
Not as far as I know. The Titlebar of a form is not part of the client area. AFAIK, the ToolTop control only works inside the client area of the form.
|
|
|
|
|
You wants a tooltip on that blue bar, just above your form? That would be the be that part of the Window that you use when you want to drag it, right?
Or do you mean some other 'control' when you refer to the header?
I are troll
|
|
|
|
|
My Break point is not hit at the time of running,even it not change the start form.
What should i do?
|
|
|
|
|
Any_India wrote: Break point is not hit
Are you sure that the line where you have kept is getting executed?
Any_India wrote: even it not change the start form
How are you trying to do that?
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
thanks for reply
I got my solution.i reinstall the .net freamwork then its working
|
|
|
|
|
I think either the code isn't beeing executed or the pdb file is missing or is out-of-date. The latter can happen for example if you debug from a different directory than where you built the program.
|
|
|
|
|
hi
i am using c# on vs 2005 window application
i am trying to create an area on the form which generate button control and let me manipulate the amount of buttons shown
the reason for this is cause i am would like to put a navigation bar which will flip thru my database like a book and display the buttons accordingly
could anyone spare anyidea how i can achieve this or shld i just make a set of buttons and use codes to manipulate the amount of buttons enabled and the caption text of the buttons when the navigation button is clicked?
|
|
|
|
|
Use a panel and programatically add the buttons to it, i.e. panel.Controls.Add(). I would ask why you need to do this though, there are already built-in controls to navigate data.
only two letters away from being an asset
|
|
|
|
|
thx
your suggestion helps alot
and the reason is cause of the limited amount of area on the form for the button and also that i am only allowed to use buttons
|
|
|
|