|
Hi,
How can I do to generate a treeview that contains all the Menus (including MenuItems too) of my MDI Form ?
Thanks.
|
|
|
|
|
There is no way to do it, but manually. You have to enumerate all MenuItem s and their children and add them as nodes.
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
|
|
|
|
|
I want to display messagebox to the users in the asp.net webpage. These message box should have the Yes,No,Cancel button in them which returns values for what they click. eg if they click yes then return like 1.
Deepak Anish
Computer Programmer
Maxumise Fiji Ltd
Suva, Fiji
|
|
|
|
|
The UI of ASP.NET is handled by the browser most of the time. The window object of the DOM has an alert method: alert("Hello, World"); It has a single button that lets the user close the dialog.
|
|
|
|
|
I need to display the confirmation message box not alert. I am using:
Response.Write("window.confirm('Moving next will result in loss of unsaved data!')");
but this doesnt give results. here either you click Ok or Cancel on the massage it does the same operation it does not check what the user clicked.
Deepak Anish
Computer Programmer
Maxumise Fiji Ltd
Suva, Fiji
|
|
|
|
|
Ok well you have two choices here - either put up with using Window.Confirm in javascript - which gives you an Ok or Cancel property
or
You can create a web page which you open as a Modal web page (showModalDialog in Javascript) and have that present the information to the user with the three choices - you can then have that return the information to you.
|
|
|
|
|
|
Response.Write("alert('hello world')");
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
Hi.Im actually working in a program for ploting Bode functions using ZedGraph user control.The main point is to gather data from graph (like coordinates of different points)and show them on a table.Anybody can show me how can I do this or maybe reference me any tutorial?
Best regards
|
|
|
|
|
I would like to have a designer property which is a collection of a complex object, a little like the Columns property for the ListView control.
I have looked for articles but to no avail.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
|
I am attempting to add plugin support to a program I wrote.
I have found many articles on Code Project, each showing how you can create objects from an assembly loaded at runtime. This is great, however, my original design made extensive use of inheritance.
Now I'm trying to figure out how I can expose a "parent class" to a plugin.
For example: Button inherits from Surface. Surface needs to be something that can be re-written by plugin developers, so that Button will now inherit the version of Surface in the plugin.
Can this even be done?
-Mike.
|
|
|
|
|
I don't think you can do that (or even want to do that; plugins should have very limited set of functionality avalible to them; inserting them into the core of a aplication is not the best choice...)...
But please correct me if I am wrong.
--------------------------------------------------------
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hello,
This can be done, although it is not an easy road you want to travel.. Here late binding is not enough, but you also need to create code at runtime. I don't know exactly how to do this. Also several problems arise: what if more than one replacement for the surface class is found? What to do with errors that the plugin might cause? Etc.
But I wonder, why do you want to give complete control over your application to some third party?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
FillEllipse and FillRectangle don't seem to work with a height or width of 1. That's too bad. I need it to draw a line or pixel when one or both are 1. It seems I have to put extra code in there just for that.
"If only one person knows the truth, it is still the truth." - Mahatma Gandhi Web - Blog - RSS - Math
|
|
|
|
|
If memory serves me correctly, the fill functions won't touch the border; so hypothetically, if after you FillEllipse, you DrawEllipse with a pen like your brush, it should create the necessary shape.
Then again, I haven't done GDI in years.
--
I've killed again, haven't I?
|
|
|
|
|
I'll add DrawEllipse. Currently, I'm doing fill without it.
"If only one person knows the truth, it is still the truth." - Mahatma Gandhi Web - Blog - RSS - Math
|
|
|
|
|
|
If that's the case, why does a height or width of two work? Aren't they drawing both sides with a minimum of 1 pixel each?
"If only one person knows the truth, it is still the truth." - Mahatma Gandhi Web - Blog - RSS - Math
|
|
|
|
|
I've got a class that uses a System.Threading.ReaderWriterLock .
class MyClass
{
int myReadLockCount;
int myWriteLockCount;
void DoSomeReads()
{
this.AcquireReaderLock();
try
{
...
}
finally
{
this.ReleaseReaderLock();
}
}
void DoSomeWrites() {...}
void AcquireReaderLock()
{
myRWLock.AcquireReaderLock(...);
Interlocked.Increment(ref myReadLockCount);
}
void AcquireWriterLock() {...};
void ReleaseReaderLock() {...};
void ReleaseWriterLock() {...};
}
During the course of running and debugging this application, I receive scenarios where myWriteLockCount variable is greater than 1! How can this be; isn't ReaderWriterLock supposed to allow one writer at a time?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: How 'bout a little guitar now?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Judah Himango wrote: void ReleaseWriterLock() {...}; // releases the writer, decrements myWriteLockCount.
Just a guess, but shouldnt you be decrementing before releasing. You dont show the code, but the comment points to a possible cause.
|
|
|
|
|
Leppie, turns out a piece of my code was acquiring the writer lock multiple times from the same thread. So it was a coding mistake on my part, as I suspected. Anyways, thanks for the reply.
|
|
|
|
|
I have an appication that requires me to have a folder treeview simlar to
this[^]
Hpw do I make the same thing? I found a similar thing on planet source code, but it just gave me a treeview displaying folders. How can I get a control that allows me to select folders in the exact same way as in the screenshot.
|
|
|
|
|
Set the TreeView.CheckBoxes property to true.
|
|
|
|
|
I created a custom tab control and tab pages are added with a CollectionEditor. The CollectionEditor will add code and remove code when the add and remove buttons are used, but if the control is deleted on the form then the source code for the tab pages does not get removed. What needs to be done in order to remove the collections when the control is destroyed?
|
|
|
|