|
Put the 2 DGVs in a split panel.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I agree with Mycroft. Use splitter controls to force the second DGV to be downsized instead of overlapping. You could do the same thing manually in resize events, but unless you've got weird layout elements that can't be changed using splitters and proper docking/anchoring will make everything much easier to implement and less likely to have weird bugs.
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
It doesn't sound like what he's doing, but if you've got multiple resizable controls on your form having the others automatically resize themselves around the one you're adjusting manually could be useful.
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
Yah maybe, it still sound like a crappy UI design. I'd go for a splitter or split panel rather tha have one DGV on top of another, control is going to be a bitch. I do wonder why a tab control or a stack panel of DGV's is not viable. There are so many options other than overlaying one control on another which I consider lousy design.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
IF you need to look at 2 or more at once tabs/stacked panels won't work. Excepting a designer I can't see any good reason not to use splitters.
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
|
Dear all,
we are facing a unique problem with the windows service which is running on windows server 2003.
After starting the service 3 to 4 days we are getting a error.
Error: Connection request timed out
After that service is ubale to establish connection to the oracle database.
Once the service restarted it works fine and again after 4 days again the same problem.
Can any one know the solution?
|
|
|
|
|
Check whether your are properly closing the database connections after every database transactions....
it might so happen that the connections are not closed and hence the database not allowing new connections..
|
|
|
|
|
Hi Roy,
Yes, we are taking care of closing the db connections in the finally block.
|
|
|
|
|
hi everybody.
i am working on VoIP using c#.Truly i have no technical idea about VoIP.so plz can anybody help me out..
|
|
|
|
|
|
I would like to change the background color of the richtext box when it is disabled. Eventhough i am assigning the backcolor to the desired color, it is not changed. The background color always comes as gray when it is disabled.
public new bool Enabled
{
get
{
return base.Enabled;
}
set
{
if (value != base.Enabled)
{
base.Enabled = value;
base.BackColor = (value == false) ? Color.Yellow : Color.White;
base.ForeColor = (value == false) ? Color.Black : Color.Blue;
}
}
}
Can anyone suggest me how to change the background color of the Richtextbox when it is disabled?
Thanks in advance,
Mutpan
|
|
|
|
|
The disabled appearance of RTB (and most other controls) is built in, and cannot be changed without a deep understanding of WINAPI, and I'm not sure that it can be changed even then.
[Edit]
As an alternative, as you are hiding the built in Enabled Property, why not use your override to set ReadOnly to true. You will then be able to use your own colouration scheme. I know that ReadOnly is not quite the same as Disabled, but would suffice for most purposes.
[/Edit]
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.”
|
|
|
|
|
How creative of you
Regards,
Jason Pezzimenti.
|
|
|
|
|
Add a class to your project
In your designer InitializeComponent() section:
this.txtq = new test.txt();
where txtq is the richtexbox and test.txt is the class.
Place following code in class:
class txt : System.Windows.Forms.RichTextBox
{
public override System.Drawing.Color BackColor
{
get
{
return System.Drawing.Color.White;
}
set
{
base.BackColor = System.Drawing.Color.White;
}
}
}
|
|
|
|
|
I need to display data in Hexa.
I will be geting data in asci which will be getting stored in string and i need to convert theis string to hexa and display it in textbox.
Ex Receiving "50 3F 52 40" as string
Need to covert in to hex as -> "P ? R @"
|
|
|
|
|
Your example seems to do the opposite of what you want.
Simplest solution might be to use String.Format.
What have you tried? If you post code then you're more likely to get a helpful response.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
This is the code snip i am working on...kindly look and let me know the answer
MessageBox.Show(this.listBox1.Text.ToString());
this.txtToSend.Text = string.Format("{0:X}", "3F 50");
i must get an output as "? P" in Hex
|
|
|
|
|
You seem to be confused about what Hex means.
This is Hex (well a string of Hex characters):
pallaka wrote: 3F 50
And this is (printable) ASCII or whatever the encoding is.
pallaka wrote: ? P
If you have a string of Hex characters separated by spaces (which is what your example shows) I suggest using Split on txtToSend.Text to get an array and then loop through the array to output the chars. You will need convert the array entries to numeric and then the numeric to char.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
|
It is doing opposite to me...
i mean if i send "?"
it is giving output as "3F" I agree i really confused...3F is my Hex value and i need to convert to asci
I need fully opposite way.....
I need to send "3F" and i should get result as "?"
|
|
|
|
|
Ah i think this will work then. When i try it prints out the correct ascii number
label1.Text = Convert.ToInt32("3F", 16).ToString();
may not be the most efficient way.
|
|
|
|
|
It Prints the value 63.
But i need "?"
how can i convert 63 to symbol representation.
You can have a look in www.asciitable.com
|
|
|
|
|
I have just learnt something new to. This may work simple cast will convert the int (ascii) to a char / symbol.
int i = 63;
char c = (char)i;
label1.Text = c.ToString();
|
|
|
|
|
Hi,
The solution will take some 10 lines of code including an explicit loop.
here are a few things you will need:
1. split the input string (which is a hex string) into parts, each holding 2 hex digits; you could use string.Split() or string.Substring()
2. convert a 2-digit hex string to its numeric value; you need int.Parse() or int.TryParse() with some options
3. convert that number to an ASCII character; you might try that with a (char) cast, the safer way would use an Encoding method.
4. concatenate all the results; either use a string operator or StringBuilder class.
If all this is too much for you, this is what you should have done: http://lmgtfy.com/?q=convert+hex+string+to+ASCII[^]
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|