15,905,971 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by srinivasan_indian (Top 28 by date)
srinivasan_indian
15-Dec-11 10:59am
View
I removed specific tag in html file using Html agility pack.
Bu i want to use some advanced technologies like LINQ or some thing else to remove specific tag in html file in c#
srinivasan_indian
15-Dec-11 9:37am
View
Where we place a file path to be remove?
srinivasan_indian
15-Dec-11 8:55am
View
Need a full code
srinivasan_indian
13-Dec-11 4:45am
View
Found the solution.
srinivasan_indian
6-Dec-11 6:08am
View
I will place my code used for tablelayoutpanel to
1. Get the row and column values during mouse_click event
2. With the help of that values, user can move the rows and columns.
Requirement:
I want to move only the particular column,but it is moving the particular column as well as the next column.
Hope you understand my issue..Code:
private void tableLayoutPanel1_MouseDown(object sender, MouseEventArgs e)
{ if (e.Button == System.Windows.Forms.MouseButtons.Left)
{ resizing = true; }
} int GRow = 0; int GColumn = 0;
private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e)
{ try { if (resizing)
{ if (rbColumn.Checked) {
tableLayoutPanel1.Cursor = Cursors.VSplit;
columnStyles[GColumn].SizeType = SizeType.Absolute;
columnStyles[GColumn].Width += e.X - columnStyles[GColumn].Width;
} else
{
tableLayoutPanel1.Cursor = Cursors.HSplit;
rowStyles[GRow].SizeType = SizeType.Absolute;
rowStyles[GRow].Height += e.Y - rowStyles[GRow].Height;
} }
} catch (Exception ex)
{ //MessageBox.Show(ex.ToString()); }
}
private void tableLayoutPanel1_MouseUp(object sender, MouseEventArgs e)
{ if (e.Button == System.Windows.Forms.MouseButtons.Left)
{ resizing = false;
tableLayoutPanel1.Cursor = Cursors.Default; }
}
private void tableLayoutPanel1_MouseClick(object sender, MouseEventArgs e)
{
try
{
int Row=0;
int VSpace = 0;
foreach (int h in tableLayoutPanel1.GetRowHeights())
{
int Column=0;
int HSpace = 0;
foreach (int w in tableLayoutPanel1.GetColumnWidths())
{
Rectangle Rect = new Rectangle(HSpace, VSpace, w, h);
if ((Rect.Contains(e.Location)))
{
GColumn = Column; GRow = Row;
RColumn = Convert.ToString(GColumn) + ',' + Convert.ToString(GRow); MessageBox.Show("Row Value = " + Row.ToString() + " " + "Column Value = " + Column.ToString(), "TableLayoutPanel", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
HSpace += w;
Column += 1;
}
VSpace += h;
Row += 1;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
srinivasan_indian
6-Dec-11 1:43am
View
I tried tablelayoutpanel control. But i am not succeed with some requiremnets. So that I need some other new control to meet all my requirements.
Requirements are,
1. Want to move specific column or row during runtime.
2. Set the backcolor for more than one cells and show the background text.
These should be meet with my new control.Help me to create like this..
srinivasan_indian
6-Dec-11 1:35am
View
i want to create a control like tablelayoutpanel. That is, Want to add rows and columns, drag the specific column or row during runtime. But dont need Tablelayoutpanel control.
Want to create some other new control.....
srinivasan_indian
6-Dec-11 0:40am
View
Please read my question clearly.. Want to create a control like TableLayoutPanel.
srinivasan_indian
5-Dec-11 7:10am
View
I need to set backcolor for multiple cells. That code is working for single cell. I tried it already...
srinivasan_indian
2-Dec-11 22:35pm
View
thanks.. Do u have any idea about this?
private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e) { try
{ if (resizing) { if (rbColumn.Checked) {
columnStyles[GColumn].SizeType = SizeType.Absolute;
columnStyles[GColumn].Width += e.X - columnStyles[GColumn].Width; } else {
rowStyles[GRow].SizeType = SizeType.Absolute;
rowStyles[GRow].Height += e.Y - rowStyles[GRow].Height; } } }
catch (Exception ex)
{ //MessageBox.Show(ex.ToString());
} }
I used this code to resize the column dynamically. But its moving the particular column with the help of GColumn value as well as the next columns. Want to move only the specific column.. Help me..
srinivasan_indian
2-Dec-11 22:30pm
View
Thanks for your reply. But I want to do it in tablelayoutpanel control.. Just check my above posted code and help me for the same...
srinivasan_indian
2-Dec-11 9:32am
View
No. If i resize specific column, that is resizing perfectly. But all the next columns are also resizing. I want to resize only the specific column.
srinivasan_indian
2-Dec-11 8:15am
View
if (resizing){if (rbColumn.Checked){
columnStyles[GColumn].SizeType = SizeType.Absolute;
columnStyles[GColumn].Width += e.X - columnStyles [GColumn ].Width ;
} }
I want to move only specific column. But this code moving the specific column as well as the next columns.
I want to move only the specific column with the help of GColumn value...
I think, we should calculate total tablelayoutpanel width size itseems...
Help me...
srinivasan_indian
2-Dec-11 2:37am
View
Yeah I tried this before itself. Its moving some point only. I will pos my code,please check it and help me..
private void tableLayoutPanel1_MouseMove(object sender, MouseEventArgs e) { try
{ if (resizing) { if (rbColumn.Checked) {
columnStyles[GColumn].SizeType = SizeType.Absolute;
columnStyles[GColumn].Width += e.X - columnStyles[GColumn].Width; } else {
rowStyles[GRow].SizeType = SizeType.Absolute;
rowStyles[GRow].Height += e.Y - rowStyles[GRow].Height; } } }
catch (Exception ex)
{ //MessageBox.Show(ex.ToString());
} }
I used this code to resize the column dynamically. But its moving the particular column with the help of GColumn value as well as the next columns. Want to move only the specific column.. Help me..
srinivasan_indian
2-Dec-11 2:25am
View
Page not found..
srinivasan_indian
2-Dec-11 0:03am
View
It shows some errors:1. GetColumnsThatUserClickedInBetween-where its declared
2.In Mousedown event, i used your code. But,it is not at all moving the specific column as well as all the columns. That is, I cant able to move any columns.
Help me for these issues..
srinivasan_indian
1-Dec-11 8:36am
View
No. If i am having the GColumn values as 3, it is moving 3rd column. Thats fine. But its moving 4th,5th column also.
Want to move only 3rd column....
srinivasan_indian
1-Dec-11 1:22am
View
Actually I am getting GColumn value through MouseClick event. I wanted to move only the specific column by getting GColumn value like 2 or 3 or 4,whatever it is.
If GColumn is 2, Want to move only 2nd column druing runtme with the help of the above mentioned code..
srinivasan_indian
1-Dec-11 1:02am
View
Error: Operator '==' cannot be applied to operands of type 'System.Windows.Forms.ColumnStyle' and 'int'
Help me...
srinivasan_indian
30-Nov-11 4:19am
View
Thanks. But i needed for tablelayoutpanel control. Help me for the same.
srinivasan_indian
30-Nov-11 1:50am
View
You are the one person, who can able to solve my issue. Hope you solve my issue.
srinivasan_indian
29-Nov-11 9:52am
View
Oh ok. Do u have any idea about my issue?
srinivasan_indian
29-Nov-11 9:17am
View
Did u find any solution?
srinivasan_indian
29-Nov-11 9:00am
View
No. Not working. Both the rows are moving. Want to move only the specific row..Please help me...
srinivasan_indian
29-Nov-11 1:00am
View
Are u clear with my issue now sir?
srinivasan_indian
28-Nov-11 23:20pm
View
Did u find any solution for my issue?
srinivasan_indian
28-Nov-11 0:40am
View
Want me to add <pre> tag
srinivasan_indian
28-Nov-11 0:40am
View
I cant understand what you are saying...
Show More