|
How to apply dock style of new tabpage? I can't find on the internet...and second thing is how to make that copy and such functions would work on all new tabpages not only original?!
|
|
|
|
|
In the Tabpage class there is a list of properties[^], one of which is the dock[^] property which accepts a dockstyle[^] value which can be None, top, bottom, left, right and fill .
Hope this get's you started.
|
|
|
|
|
Aljaz111 wrote: 1. Name the new tab
new tab name can be change with the .Text property
Aljaz111 wrote: 2. Docking of new one same as original--Fill
the docking of the tab page with depend on the tabcontrol so assume you mean the RichTextBox, whcih has a property called .Dock in which you can apply a DockStyle each time you create a new instance of the RichTextBox
Aljaz111 wrote: 3. Copy & paste & and changing font for all the tabs not only original one
when you do the copy/paste/font function then you need to loop all available tab pages in the tab control and then set then do whatever in the loop, not just with each one.
when you set the name of the RTB try setting it to use a numeric value based on the number of tab pages display...
rtb.Name = "RichTextBox" + tabControl.TabPages.Count;
when you want to access all RTB's then try something like...
int count = 0;
foreach(TabPage page in TabControl1.TabPages)
{
count++;
RichTextBox rtb = (RichTextBox)page.Controls["RichTextBox" + count];
}
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
It works just fine..thank you man!! One thing more.. when i try to save all modified tabs.. how to?? This code doesn't work correctly..it shows just one save dialog..else just question if i would like to save changess..here is code..
private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
{
int count = 0;
foreach (TabPage page in tabControl1.TabPages)
{
count++;
RichTextBox richTextBox1 = (RichTextBox)page.Controls["RichTextBox" + count];
temp = richTextBox1;
if (temp.Modified)
{
DialogResult result = MessageBox.Show("Do you wish to Save changes?", "Save Changes", MessageBoxButtons.YesNoCancel);
if (result == DialogResult.Yes)
evtSave_Click(sender, e);
else
if (result == DialogResult.Cancel)
e.Cancel = true;
}
}
modified on Wednesday, May 27, 2009 2:23 PM
|
|
|
|
|
well the code you have there for setting the font is in a loop so it will do it for every run of that loop i.e. for every tab page.
if you want to do things for just the selected tab page then instead of looping all the tab pages in the tab control. you can simple use the tab controls 'SelectedTabPage' property...
RichTextBox richTextBox1 = (RichTextBox)TabControl1.SelectedTabPage.Controls["RichTextBox" + count];
FontDialog f = new FontDialog();
if (f.ShowDialog() == DialogResult.OK)
richTextBox1.Font = f.Font;
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
What about the count?? Where should i get it? I tryed with paste function like this..but it doesn't work...
private void evtEditPaste_Click(object sender, EventArgs e)
{
int count = tabControl1.SelectedIndex;
RichTextBox richTextBox1 = (RichTextBox)tabControl1.SelectedTab.Controls["RichTextBox" + count];
richTextBox1.Paste();
}
That doesn't work!!
modified on Wednesday, May 27, 2009 2:51 PM
|
|
|
|
|
Hi friends,
I want to edit the registry key: HKEY_CURRENT_USER\Control Panel\Desktop\MenuShowDelay" which has the default value data as '400'. All I want is to change it to '200', such that the menu shown while clicking the Start button, speeds up. I searched google and I found numerous results, but was not sure if to go with them becasue Registry is very critical and editing a wrong key could mess up my system.
Please help,
Cheers,
Rajdeep.NET
PS: Please provide me a sample code to do this. Would be very helpful.
|
|
|
|
|
|
Why on earth are you doing this?
|
|
|
|
|
YOUR ORIGINAL POST IS STILL ON THE FIRST SCREEN STOP SPAMMING!!!!
|
|
|
|
|
Kindly click on "Vote to Remove Message" instead of low-voting it. ATM, I see 10x1 votes and the message is not tossed off the board yet.
Added: Ah, the power of democracy! Looks much better now.
It is a crappy thing, but it's life -^ Carlo Pallini
modified on Wednesday, May 27, 2009 9:44 AM
|
|
|
|
|
Rajesh R Subramanian wrote: Kindly click on "REPORT MESSAGE" instead of low-voting it
I see no such facility.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
On the bottom right of the message, below the voting numbers is the [Vote to remove message] link! Something like 3 to 7 clicks (depending on the weightage of the member voting on it) on that will automatically remove the message permanently.
[Edited my previous post too to make it clear]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Abbe saale Tamil Nadu ki punch.... Saale Prabhakaran ki aulad, jab inn logo ko tere kaale rang ke baare mein pata chalega, tab kya hoga kabhi socha hai? Bara aaya .net sikhaane!
|
|
|
|
|
SOAD
My failometer has shot off the end of the scale!
I seem to have misplaced my ban button.. no wait... found it!
|
|
|
|
|
Have you never heard of google? Or if your not sure of your code write some and post it here and ask about the code not how to do it!!!! you need to find a new career.
|
|
|
|
|
Google is inaccessible, maybe someone hacked it. Did you?
|
|
|
|
|
|
My guess is Google is blocking Rajdeep. They probably got tired of his/her stupid searches.
|
|
|
|
|
I take it you didn't like the previous relpies?
GROW UP.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
|
Drawing pictures now, nice career change. Good luck with that.
My failometer has shot off the end of the scale!
I seem to have misplaced my ban button.. no wait... found it!
|
|
|
|
|
Why the penis have you posted this here. There is no programming involved.
Just do it the way you have seen on google. Yes it's not good to edit registry values, but in this case one value can be changed back if you need. And it's not going to kill you machine... unfortunately.
There is an alternative if you are interested?
Do you have wireless or physical connection to the internet?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Please stop, please. You're the worst possible start to a day. I'm tired of seeing idiotic posts, please just read a beginners book and build up a base, otherwise you're going to be labeled the C# idiot.
|
|
|
|
|
Hello,
I am new to C# and asp.net. I want to display a svg file which in created in one of folder on local machine.
Please can anybody help with the code how to set the response object to display the svg file also taking the local path in to consideration.
Regards
Rajesh B
|
|
|
|