|
A bit like Outlooks Calendar feature? Sorry, got the wrong end of the stick. Two routes to what you want - either get a 3rd party control which does that sort of thing or roll your own.
If you've not written a control like that before, its not a light undertaking!
Regards,
Rob Philpott.
|
|
|
|
|
what do you mean by third party control? something like Google calendar API
Cheers
|
|
|
|
|
You might want to have a look at:
Month Calendar[^]
and maybe:
Calendar DayView Control[^]
as well. There are demos and source code you can download and tweak should you wish.
Hope this helps, and good luck.
|
|
|
|
|
hi guys
i am having trouble formating my string text for my listbox.
this is what i am using
String.Format("{0,-15} \t {1,-50} \t {2,-20} \t", data1,data2,data3);
however due to the amount of space some text used up when many words are used the tab always goes out of place and end up making untidy
does anyone have a better alternative or a solution for this problem? pls assist
|
|
|
|
|
Try a fixed-size font (e.g. Courier) and fill it up with spaces instead of tabs
Doesn't look to cool, I know. If you want something better looking, try the DataGridView or the ListView .
I are troll
|
|
|
|
|
Hi,
I need to plot the Square Wave form which have X and Y- Axis. The Wave will get Plot in to the graph(Windows Form) using c#.
Thanks
With Reg,
Palanivel
|
|
|
|
|
I think you need to be a bit more specific here? How is your wave represented? As a frequency, a wavelength, an array of samples?
Are you just trying to plot it to the screen?
Regards,
Rob Philpott.
|
|
|
|
|
Thanks for your quick response Rob!!!
Yes the wave can be drawn from the Array of values and the possible values are follows;
- Along the X-Axis (1,2,3,4,....) Y-Axis(A, B, C, D...)
- Based upon the bit values like 010101010 it should come up with UP(1)/DOWN(0) for A in Y-Axis.
It would be helpful if you shown me how to plot the value for Single Y-Axis 'A' Row.
Thanks,
Palanivel
|
|
|
|
|
Okidoke, you don't need to worry about the X-Axis, this just always increments. So you've got an array of booleans which alter (which is pointless really as we can draw a square wave by appreciating its repeating manner).
Graphics wise you'll want a windows forms application. Derive a class from Panel. In the derived classes override OnPaint.
You get a Graphics object given to you by that which allows you to draw lines and such things.
Create the loop and draw the lines. I can't offer much more help without knowing about things like frequency, scaling etc.
Regards,
Rob Philpott.
|
|
|
|
|
Thanks Rob!!!
Your valuable points helpful to achieve the task.
|
|
|
|
|
spalanivel wrote: Square Wave form which have X and Y- Axis
And what exactly have you tried so far?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
A flexible charting library for .NET[^]
See this and try to use the function in it.
For example :
X = 0, 0, 1, 1, 2, 2, ...
Y = 0, 1, 1, 0, 0, 1, ...
That is a square wave.
|
|
|
|
|
Hi,
Using "AutoCompleteExtender" AJAX control, we can autocomplete the words, in web application.
How can I achieve the same functionality in Windows application?
Please guide me.
Thanks in advance.
|
|
|
|
|
There are some AutoComplete [^] properties on the TextBox that you can use. An example on it's usage can be found here[^].
Good luck
I are troll
|
|
|
|
|
Thanks alot Eddy Vluggen!!
Its working..
|
|
|
|
|
Hi
I want to find a node from its text in an XML file with given string.
I'm taking this text from a textbox in my application and I want to find this node from XML file and
do some changes on it like changing childrens' texts or deleting the node and it's children from file.
any help :/ ?
|
|
|
|
|
|
There's usually two approaches to XML things like this, a streaming one which has a small memory footprint or the document approach where you load the whole xml into memory. The latter is easier if your xml is not too big.
(There's also a swanky new way using Linq2Xml which I know nothing about).
Something *like* :
XmlDocument doc = new XmlDocument();
doc.Load(<the file="">);
XmlNodeCollection nodes = doc.SelectNodes("//<element name="">");</element></the>
That will return you all the child elements with the name your looking for. You can iterate over them etc.
You'll need to brush up a bit on XPath to do it, but its easy enough once you've got your head around that.
Regards,
Rob Philpott.
|
|
|
|
|
thanks for replies
I've changed my app a bit.
to be more precisive, the XML document is like:
<app>
<appname>application1</appname>
<action><arg>argument1</arg><ges>gesture1</ges></action>
</app>
<app>
<appname>application2</appname>
<action><arg>argument2</arg><ges>gesture2</ges></action>
</app>
..etc
I'm choosing a node from my treeview first, and the node in the treeview has the name with "title" node's inner text, (so arg and ges nodes are siblings for the title)
what I'm doing right now is;
XmlDocument doc = new XmlDocument();
doc.Load();
XmlNode editing = doc.SelectSingleNode(treeView1.SelectedNode.Text);
editing.NextSibling.InnerText = "changedText";
in fact, application gives "Object reference not set to an instance of an object." message pointing the "XmlNode editing = doc.blahblah" line
any further help?
edit: there's also a <title>NodeTitle1/2</> tag among arg and ges nodes which I forgot to add to xml example
|
|
|
|
|
The problem lies on you SelectSingleNode line.
You have to treat XPath statements a bit like directory structures. Unless there's a top level node of that name you won't find it.
You can use \\ to denote any (this node and all below). Try the below:
XmlNode editing = doc.SelectSingleNode(@"\\" +treeView1.SelectedNode.Text);
Regards,
Rob Philpott.
|
|
|
|
|
yeah this seems like the answer, but I couldn't understand the string structure
I've pasted your line in my code and it still gives an error:
XPathException was unhandled:
'\\Applications' has an invalid token.
:/
|
|
|
|
|
um, try forward slashes rather than backslashes - my memory may be letting me down....
Regards,
Rob Philpott.
|
|
|
|
|
Thanks Rob you've been very helpful
but now another error occured in the next line,
XmlNode editing = dom.SelectSingleNode(@"//" + treeView1.SelectedNode.Text);
editing.NextSibling.InnerText = "changedText";
I promise, no more questions =))
|
|
|
|
|
Have a look at this Linq example.[^]
hmmm pie
|
|
|
|
|
Hi All,
I have generating a problem when i am tring to Copy Image in Clipboard.
Bitmap bmp1 = new Bitmap(panel3.ClientRectangle.Width, panel3.ClientRectangle.Height);
panel3.DrawToBitmap(bmp1, panel3.ClientRectangle);
Clipboard.SetImage(bmp1);
When i paste it on Paint and Print it then Image not Showing properly. Image is streatcing.
Thanks
If you can think then I Can.
|
|
|
|