|
What do you mean underneath? Do you want the two panels to form a single column with one on top and one on bottom?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Yes, it keeps making different columns but I want them, one on top, one on bottom.
|
|
|
|
|
In that case you need to nest the panels.
The idea is you have your MainForm with a panel (say leftPanel) docked to the left. Now, you would add two panels to leftPanel. The first would be docked to the top and the second would be set to Fill.
If you want something that is user-customizable (like Visual Studio) then that's a different story. There are examples of this if this is what you are looking for.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thankyou, I only wanted a simple docking network thanks ^_^
|
|
|
|
|
Hi, I have a class I want to deserialize using the BinaryFormatter 's Deserialize method. I never really had any problem with this but for some reason I'm now getting a very weird exception: The complaint is that the constructor of this particular class is missing, while I've obviously implemented it. This is what my code looks like:
[Serializable]
public class IndexedBaseDataCollection : Dictionary<int, IBaseDataContainer>, IBaseDataContainer
{
public IndexedBaseDataCollection()
{
}
.
.
}
And here's the exception I'm getting:
<br />
System.Runtime.Serialization.SerializationException: The constructor to deserialize an object of type 'Engineer.Data.IndexedBaseDataCollection' was not found. ---> System.Runtime.Serialization.SerializationException: The constructor to deserialize an object of type 'Engineer.Data.IndexedBaseDataCollection' was not found.<br />
at System.Runtime.Serialization.ObjectManager.GetConstructor(Type t, Type[] ctorParams)<br />
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
I've tried using a construct that overrides the base() constructor but that doesn't seem to help at all. I can only guess this might have something to do with the Dictionary base class. All values of type IBaseDataContainer are perfectly serializable by the way. Any ideas?
Thans in advance.
Standards are great! Everybody should have one!
|
|
|
|
|
I bet that it is due to the fact that dictionary is only serializable due to the fact that it implements the ISerializable interface. I think the deserializer is looking for the deserialization constructor within your type, which clearly doesn't exist. Perhaps you will need to create a constructor that matches the one that is implemented with the ISerializable interface and simply pass it through to the base as follows:
protected IndexedBaseDataCollection(SerializationInfo info, StreamingContext context)
: base(info, context) {
} If that doesn't work, then you may even need to implement the full ISerializable interface, and pass the data through to the dictionary. This is just a guess, but hopefully it is helpful. Let us know if you get it working,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
This is exactly right. Thanks!
Standards are great! Everybody should have one!
|
|
|
|
|
|
I think you need to add a special constructor for deserialization like so:
protected IndexedBaseDataCollection(SerializationInfo info, StreamingContext context) {
}
The Dictionary<TKey,TValue> (in .Net 3.x anyway) implements ISerializable. Which (I'm 99% sure) means you need the above constructor for deserialization.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi,
Anyone any idea how i can get the selected style from windows XP. (classic or XP style ?)
thx
kurt
|
|
|
|
|
Great,
declaration.
[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]<br />
public extern static Int32 GetCurrentThemeName(StringBuilder stringThemeName, int lengthThemeName, StringBuilder stringColorName, int lengthColorName, StringBuilder stringSizeName, int lengthSizeName);<br />
and the way to use
StringBuilder stringThemeName = new StringBuilder(260);<br />
int lengthThemeName = 260;<br />
StringBuilder stringColorName = new StringBuilder(260);<br />
int lengthColorName = 260;<br />
StringBuilder stringSizeName = new StringBuilder(260);<br />
int lengthSizeName = 260;<br />
if(GetCurrentThemeName(stringThemeName, lengthThemeName, stringColorName, lengthColorName, stringSizeName, lengthSizeName) == 0)<br />
{
Greetz
Kurt
|
|
|
|
|
I´m starting to build a windows wizard program using visual studio 2005. And I would like to know what’s the best way to do it.
I’m trying to use a different usercontrol for each scenario but I don’t know if it’s the better solution..
|
|
|
|
|
|
tank you mi friend, it was very helpfull....
|
|
|
|
|
You're welcome.
Standards are great! Everybody should have one!
|
|
|
|
|
hello everybody,
each cell in the excel file is character limited by 255 character, so when i arrive to the 255th character it's truncated and my program return a wrong string .
it's the first time i face this problem, please if somebody can help
thank you
|
|
|
|
|
Before you put the data in the cell check and see if it is longer than 255 characters, if so inform the user and stop inserting the data.
|
|
|
|
|
i alredy have a value exceed the 255 characters i just want to read it
is there any way to do that
thank u for replying
|
|
|
|
|
There is no way to magically get the data that was truncated. You either need to stop it from truncating when you do the insertion or at least notify the user that data has been truncated.
|
|
|
|
|
hi,
i'm creating ListviewItems and inserting them into a ListView
that works Like this :
<br />
ListViewItem lvi = new ListViewItem(itemsArray);
lstwBank.Items.Add(lvi);<br />
the funny thing is that when i'm trying to change on of the sub items in the ListViewItem
nothing happens
it goes something like this:
<br />
lvi.SubItems[0].ForeColor = Color.Red;<br />
i've enen tried to create a ListViewItem.ListViewSubItem
but still the property are not affected
Help Anyone!!!
THANKS
P.S
Oh almost foraget i'n using VS 2005 Express
Have Fun
Never forget it
|
|
|
|
|
half-life,
You need to Invalidate(); the control.
Regards,
Gareth.
|
|
|
|
|
it's not working
maybe i'm doing it wrong??
Here is the code :
<br />
lstwBank.Invalidate(lvi.SubItems[3].Bounds);<br />
and i'd tried the whole control:
<br />
lstwBank.Invalidate();<br />
Have Fun
Never forget it
|
|
|
|
|
Perhaps adding the line of code in bold will help.
<br />
ListViewItem lvi = new ListViewItem(itemsArray);
lvi.UseItemStyleForSubItems = true;<br />
lvi.SubItems[0].ForeColor = Color.Red;<br />
lstwBank.Items.Add(lvi);<br />
|
|
|
|
|
Sorry, not working
strange, where did i Go Wrong
THANKS a Lot anyway
Have Fun
Never forget it
|
|
|
|
|
Maybe you can post all of the relevant code as it is in your program. It would make it easier for others to help you out...
|
|
|
|