|
What parts of your controls are not getting repainted? Text? Parts that are in certain containers? Does selecting the control or selecting another force a repaint?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
For example:
- I have a list view with 10 columns and horizontal and vertical scroll bar.
When the user control gets resized, not all the columns header can be seen properly and some of their text gets mixed.
The scroll bars disappear (while they shouldn't).
When I reload items to the list it gets repainted well from the beginning.
- I have some labels with in cells in table layout. When it shrinks the label automatically wraps its text with in and changes its size over the screen, when its gets spread again, some of the labels is text remain shady and gets mixed up with neighborhood labels.
It seems like the repaint operation simply does not come to its end, so the screen is left with former pixels status - pixels that should have been repainted had the operation would have completed. How can it be?
just selecting the control and gain him a focus does not couze it to be repainted. (it should have done so ?)
I m kind'a new here, is there a way that I can upload some small printscreens to farther demonstrate what I am experiance ?
|
|
|
|
|
Hi.
How can i save a word document to xml format for parsing later with xslt.
I noticed that word 2007-2010 document are constructed with the openxml format so i can use openxml tools to save it.
But word 2000-2003 seems to be in binary format.
Is there a tool that i can use for this mission?
Thanks
|
|
|
|
|
Haim Nachum wrote: Is there a tool that i can use for this mission?
Yes, Word and Save As
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Do you (a) need to access the spreadsheet data programatically, or (b) do you just need a conversion tool.
If (a), there are one or more articles on this site that will discuss the pre-XML Word format and how to read and manipulate the data.
If (b), what level of automation do you require? Indeed, File | Save as in a recent version will let you save in either OOXML or ODF formats.
|
|
|
|
|
Im sorry , i thought that if i posted the question on a c# forum and would be clear that i meant it programatically.
I will seek articals about it.
Thanks
|
|
|
|
|
Hi
don't know if this is the right place where to post.
But i was wondering if is possible to use switch statement with multiple variables, something as below :
int x = 0;
int y = 1;
switch(x,y)
{
case 1,0 :
Console.WriteLine("1,0");
break;
case 0,1 :
Console.WriteLine("0,1");
break;
case 1,1 :
Console.WriteLine("1,1");
break:
default :
Console.WriteLine("0,0");
}
thanks bye
"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras
|
|
|
|
|
No.
Did you check the documentation? the language specification?
You could make a composite function, in your example int z=2*x+y would suffice; but readability would suffer.
And you could make a new type, hide the values in there, spend a lot of code and waste numerous CPU cycles. What is it good for?
The obvious approach is a series of if ... else if
|
|
|
|
|
Thaks for the reply..
The obvious approach is a series of if ... else if
i agree!
You could make a composite function, in your example int z=2*x+y would suffice; but readability would suffer.<code><br />
<br />
i used int type variables just for example, actually i'm working with strings.<br />
<br />
<br />
<br />
Thanks again!! :) <br />
bye<br />
<div class="signature">"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras</div>
|
|
|
|
|
jadughar wrote: actually i'm working with strings
Aha. Strings probably are the only situation where I might consider it, using a concatenation, i.e. calculate x+"#"+y at run-time, and have "0#1" and the like as switch case values (C# supports string-based switches, a lot of languages don't). It might be acceptable as the cost is limited and readability does not suffer at all.
|
|
|
|
|
Good idea!!!!
Thanks Luc!!
"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras
|
|
|
|
|
you're welcome.
|
|
|
|
|
Luc Pattyn wrote: a lot of languages don't
And for good reason too.
|
|
|
|
|
You could convert it to a string, and switch to the correct label (like "0,0"). This[^] blogentry might be interesting if you're considering that option
I are Troll
|
|
|
|
|
Obviously not, as I'm sure you would have found out by trying to compile this.
Fortunately, switch can be nested.
untested:
int x = 0;
int y = 1;
switch (x)
{
case 0:
switch (y)
{
case 0:
Console.WriteLine("0,0");
break;
case 1:
Console.WriteLine("0,1");
break;
}
break;
case 1:
switch (y)
{
case 0:
Console.WriteLine("1,0");
break;
case 1:
Console.WriteLine("1,1");
break;
}
break;
}
|
|
|
|
|
Having read the other reponses, first off I'll say that I very much dislike switching on strings.
How much do these values vary? Are they coordinates for a small grid? Is the grid size defined?
I would prefer to define an enumeration to hold the values, for instance:
public enum Coord
{
XY00 = 00
,
XY01 = 01
,
XY10 = 10
,
XY11 = 11
}
and then switch on that.
|
|
|
|
|
you are right..but in my case, a switch on strings was suitable..
anyway thanks to all
"For as long as men massacre animals, they will kill each other. Indeed, he who sows the seed of murder and pain cannot reap joy and love." Pythagoras
|
|
|
|
|
PIEBALDconsult wrote: I very much dislike switching on strings
Out of curiosity, why is that?
|
|
|
|
|
One big reason is case-sensitivity.
But mainly because it's a symptom of a bad design. Most times I see or would use a switch on a string, there's a better way. I much prefer to have an enumeration. As a plus, the enumeration Parse method accepts a boolean to do case-insensitive parsing.
It's for what my EnumTransmogrifier[^] was created.
|
|
|
|
|
I may be totally missing the point of your question (I usually do ) but wouldn't
Console.WriteLine("{0},{1}", x, y);
do that for you?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Nope. See default .
|
|
|
|
|
I saw it.
Implementing value checking for assignments to 'x' and 'y', using properties perhaps, would obviate the necessity though.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
HI,
May i know,
What are the prerequisites to learn sharepoint?
Iam only C, C++, VC++ Programmer Having 5 years of IT Experiance.
Thanks & Regards,
Krishna Rayalu TV
|
|
|
|
|
Asking in this[^] forum would be a better bet.
|
|
|
|
|
As Pete has said posting to the SharePoint forum would have been better, however, since you've already begun.
First, since you have no background in .NET, start there. The default language for SharePoint is C# so dig in. After that, since SharePoint is based on ASP.NET you will need to learn and understand it. After, and ONLY AFTER, you have these foundations, then you can start learning SharePoint.
I know the language. I've read a book. - _Madmatt
|
|
|
|