|
Hi H,
I just built an application using the approach you mention (tabbed with an MDI on the outside). I find that this interface works extremely well for a large number of applications. In particular, the ability to constantly show navigation / menu bar / etc on the MDI parent.
I used Infragistics tool suite to build out the interface - they have a component that actually makes MDI children tabbed - and abstracts most of the work for you. I highly recommend checking it out! The component is called UltraTabbedMDIManager ...
|
|
|
|
|
Principally I guess that in standard MDI you can have multiple views on the screen at once where tabs kind of limit it to one. Some 3rd party docking controls allow you to go either way by dragging views around - like in Visual Studio.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Principally I guess that in standard MDI you can have multiple views on the screen at once where tabs kind of limit it to one.
Agreed. This is the primary reason my personal browser's been Opera for the last 7+ years.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
Why not use a TabControl then?
|
|
|
|
|
...if your idea of fun is as warped as mine. No Visual Studio allowed.
static void Main(string[] args)
{
try
{
TestStatic.SaySomething("HI");
}
catch (Exception error)
{
Console.WriteLine(error.InnerException.Message);
}
try
{
TestStatic.SaySomething("Hi 2");
}
catch (Exception error)
{
Console.WriteLine(error.InnerException.Message);
}
Console.ReadLine();
}
}
public class TestStatic
{
static TestStatic()
{
throw new Exception("Afternoon Exception");
}
public static void SaySomething(string message)
{
Console.WriteLine(message);
}
}
Regards,
Rob Philpott.
|
|
|
|
|
|
Did you cheat?
Regards,
Rob Philpott.
|
|
|
|
|
Nope. This is easy, the first time a static method gets invoked, the static constructor is invoked. Yours throws an exception. The second time, the static constructor is not invoked again, so your call succeeds.
|
|
|
|
|
Le Centriste wrote: Nope. This is easy
Why did you get it wrong then?
Regards,
Rob Philpott.
|
|
|
|
|
I got it wrong? Then, why did you accuse me of cheating?
|
|
|
|
|
Hes playing. But you did get the answer wrong.
|
|
|
|
|
Yes, I finally ran it. I am surprised that the static constructor is called twice. Probably because it is throwing an exception.
|
|
|
|
|
The static constructor is NOT being called twice.
|
|
|
|
|
yeah, you're right. So, when the static constructor first throws an exception, any attempt to use the static methods (or maybe instance methods) rethrows the exception.
I never use static constructors, and such behavior does not make me want to them.
|
|
|
|
|
I think the TestStatic.SaySomething will not be called and it will directly go to the catch block.
But the second TestStatic.SaySomething will be called because static constructors are called only once, afaik.
Am I correct ?
|
|
|
|
|
erm... No. But well done for not cheating.
Regards,
Rob Philpott.
|
|
|
|
|
So, both me and this guy give the correct answer. You greet him and you accuse me of cheating. You're a plain a**hole.
|
|
|
|
|
You both got the answer wrong . He was only joking when he asked if you were cheating...
|
|
|
|
|
He forgot the icon, so I took as a personal attack.
|
|
|
|
|
That's a bit rude isn't it? Not sure I like you. And neither did I accuse you of cheating. Tut.
Regards,
Rob Philpott.
|
|
|
|
|
Hmmm I am not sure of this.... Anyway, my apologies if I offended you.
|
|
|
|
|
Not offended at all Sir.
Regards,
Rob Philpott.
|
|
|
|
|
I didnt think you could compile with a static constructor? I assume i am wrong thou as others have tested? so in which case i would say output is..
HI
Hi 2
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Can't compile with a static constructor?! Not sure they'd be much use in the language if that were the case. Sorry, you're wrong too.
Regards,
Rob Philpott.
|
|
|
|
|
hmmm... well as the TestStatic class is not static it can have a constructor, i just didnt know it could be static. but either way any static methods (i.e. SaySomething) can be called without the need to create an instance of your class, which you are not doing in your code. So both calls to the SaySomething method should be successful, can you explain why either would fail? i think not.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|