|
Typical MS bull****
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Thanks guys but I found what I wanted...
I'll just use a toolTip... just didn't found it till now.
Thanks any-way...
NaNg.
|
|
|
|
|
I have created graphics on a tabpage but cannot get its autoscroll working at all.
Graphics g = tabPage1.CreateGraphics();
g.DrawString("Hello how are you?", new Font("Courier New", 10, System.Drawing.FontStyle.Regular), new SolidBrush(Color.Black), 10, 20);
tabPage1.AutoScroll = true;
Anybody know how to fix this problem?
|
|
|
|
|
AutoScroll is concerned with the location/size of child controls. Rendering a string onto a tabpage has no effect on the logical visible area required to show all child controls, so the autoscrolling is unaffected. I suppose that you could add a Label to the tabpage, set it's Text to the string you are drawing, and position the Label such that it is outside of the currently visible area of the tabpage.
Josh
|
|
|
|
|
Thanks. But it doesn't seem to allow using both label and graphics on the same tabpage !?
I used labels before but the display time was very very slow. So I changed to use graphics which can be displayed much much faster. I tried adding a label right after the last graphic object which should be outside of the currently visible area of the tabpage. However, all the graphic objects just blink & disappeared.
|
|
|
|
|
No, you have drawn something on the screen where the tabpage happens to be. Whatever you do to the tabpage won't affect what you drew. Actually, anything that makes the tabpage redraw will draw over what you drew.
If you want to draw something on the control, you have to use it's Paint event, so that whatever you draw will be redrawn when the control is redrawn.
---
b { font-weight: normal; }
|
|
|
|
|
How do I use paint event? When will the paint event be triggered?
I need to write different text on a tabpage line by line. Can the paint event draw different strings to a control?
Please help!!! I need a solution to it.
|
|
|
|
|
Does anyone Know where I can find a list of Messages that I can use with SendMessage function?!
Thanks
|
|
|
|
|
http://www.autohotkey.com/docs/misc/SendMessageList.htm
|
|
|
|
|
Thanks a lot, stan!!!!!
|
|
|
|
|
OMG! there´s even a tutorial for PostMessage!
Thanks a lot!!!!!!!!!!!
now my day is complete =DDD
Best Regards
|
|
|
|
|
Hi there!
I am having trouble with Serializing my classes into an XML file.
My classes are as follows:
**************
public class Class1 : CollectionBase
{
public Class1()
{
Class2 newClass = new Class2();
this.List.Add(newClass);
}
public Class2 this[int i]
{
get{return (Class2)List[i];}
}
public void Add(Class2 C)
{
this.List.Add(C);
}
}
public class Class2 : CollectionBase
{
public Class2()
{
this.List.Add("Hello");
}
public string this[int i]
{
get{return (string)this.List[i];}
}
public void Add(string S)
{
this.List.Add(S);
}
}
**************
Now they do serialize, however they do not serialize as I need them. The result looks like [I removed the namespace bits...]>
<?xml version="1.0" encoding="utf-16"?>
<ArrayOfArrayOfString ... >
<ArrayOfString>
<string>Hello</string>
</ArrayOfString>
</ArrayOfArrayOfString>
I need the names to be more user friendly instead of ArrayOfArrayOf... etc. A further issue I have is that my actual application consists of >
Class1 : CollectionBase
contains Elements of Class2
Class2 : CollectionBase
contains Elements of Class3
Class3 : CollectionBase
contains Elements of Class4
Class4
I want the serialization to NOT include the Class4 elements of Class3 however it does and I can't find a way to stop it?!
Does anyone have any ideas on how to correct this?
Many thanks,
Tom.
-- modified at 10:58 Wednesday 31st May, 2006
|
|
|
|
|
Use the XmlArrayAttribute and XmlArrayItemAttribute .
|
|
|
|
|
And use XmlIgnoreAttribute for the items you don't want it to serialize.
|
|
|
|
|
Thank you for the reply, Dustin!
I have tried to do this with no success.. If the classes contained a collection such as an ArrayList, this does work but as the classes are derived from CollectionBase, I cannot find a way to achieve the same results.
For the Class1/Class2 example I gave, where would I put the XmlArray attributes? Could you supply some code as an example?
Thanks,
Tom.
|
|
|
|
|
Ah, ok. I see what you're doing. Well, there's not really a quick and easy way to fix this. The XmlSerializer really is not that intelligent. One thing that I do is implement the IXmlSerializable interface whenever the XmlSerializer can't do the job. Is this an option for you? The alternative is to structure your classes in such a way as to be more conducive to the XmlSerializer.
|
|
|
|
|
Hi Dustin, thanks again for the reply!
I realised that by using the XmlSerializer, I would have to 'compromise' a little on the class structure design and I have tried to do this as much as possible but I unfortunately have gone as far as I can.
I should be able to implement the IXmlSerializable interface although I must confess, I've not done this before. I'll do some research now and see if this will help me out!
Many thanks for your help!
Tom.
|
|
|
|
|
The XMLSerialiser can only handle Arraylist or arrays. It says that in the docs somewhere.
|
|
|
|
|
Hi leppie,
Thanks for the reply.. That makes sense and fits in with what I have seen. Thanks for confirming!
Tom.
|
|
|
|
|
There are easy ways around any problems with types just using properties to get/set underlying non serializable types with TypeConverters.
|
|
|
|
|
Hi leppie,
Could you possibly detail an example using the original class structure examples I gave?
It would be much appreciated.
Thanks,
Tom.
|
|
|
|
|
It depends how you want the XML to look, show me what you want. And what will be the container of the 'outer' collection?
|
|
|
|
|
FunkyBeerMonster wrote: Class1 : CollectionBase
contains Elements of Class2
Class2 : CollectionBase
contains Elements of Class3
Class3 : CollectionBase
contains Elements of Class4
Class4
Isnt that just: Class4[][][] ?
|
|
|
|
|
Hi Leppie/Darren,
I think I have got this sorted now.. I have utilised the IXmlSerializer interface and with a small amount of tweeking, it seems to be sorted.
Thanks for your help!
Tom.
|
|
|
|
|
hi all,
how do i get a value in datagridview ?
cellValue = dataGridView1.Rows[0].Cells[1].ToString(); ??? how do i change this line ?
help please ...
thanks, bye.
|
|
|
|