Tabsplitter row index question!
Hi,
can i show row numbers in tabsplitter? (maybe I need to add textbox to tabpage however textboxext doesn't have this capability)
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
EM
Elakkiya Muthukumarasamy
Syncfusion Team
November 3, 2020 10:02 AM UTC
Hi khanh,
Greetings form Syncfusion.
We have checked your query ”Need to show row numbers in tabsplitter” and found that, we can achieve this by add the EditControl in the SplitterPage as shown in below screenshot. Please refer the below code snippet for same.
Code Snippet:
|
TabSplitterContainer tabSplitterContainer1 = new TabSplitterContainer() { Dock = DockStyle.Fill };
this.Controls.Add(tabSplitterContainer1);
TabSplitterPage tabSplitterPage1 = new TabSplitterPage();
TabSplitterPage tabSplitterPage2 = new TabSplitterPage();
tabSplitterPage1.Text = "XAML";
tabSplitterPage2.Text = "Design";
editControl1 = new Syncfusion.Windows.Forms.Edit.EditControl();
editControl1.Size = new Size(50, 50);
editControl1.Dock = DockStyle.Fill;
editControl1.BorderStyle = BorderStyle.Fixed3D;
tabSplitterPage1.Controls.Add(editControl1);
// Set back color.
tabSplitterPage1.BackColor = System.Drawing.SystemColors.ControlLightLight;
tabSplitterPage2.BackColor = System.Drawing.SystemColors.ControlLightLight;
//Set size to tabsplittercontainer
tabSplitterContainer1.Size = new System.Drawing.Size(443, 315);
// Add it to TabSplitterContainer.
tabSplitterContainer1.PrimaryPages.AddRange(new TabSplitterPage[] { tabSplitterPage1 });
tabSplitterContainer1.SecondaryPages.AddRange(new TabSplitterPage[] { tabSplitterPage2 }); |
Screen Shot:
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/TabSplitter-1758725051
Help Documentation link for Edit control: https://help.syncfusion.com/windowsforms/syntax-editor/getting-started
Please try it and if you have concerns with the provided solution, please share us more details about your requirement and details. These details will be helpful for us to proceed further.
Regards,
Elakkiya
Marked as answer
TG
The GridLock
November 3, 2020 03:51 PM UTC
great Elakkiya,
I will try your code.

update:
I have some questions:
I used multi-line textboxext before so:
how can i assign them all to editcontrol?
I use the code: editcontrol.text = mytext however it only adds only the first row.
(i want to convert it to a normal textbox like textboxext)
2nd: how to swap text between 2 editcontrol?.
3rd: how to get all text from editcontrol?/
4: can i change border color of editcontrol
5: I have set the font for editcontrol but it doesn't display correctly:
Does this code work: editcontrol.Font= New System.Drawing.Font("Calibri", 8!)6: how to autofit textarea while resize form? (I want it to work as textbox (ie text is always in the visible area or in other words horizonscrollbar will not be required.).
7: how to ignore autoformat text as image ()
BR
Bharathi Rajakantham
Syncfusion Team
November 4, 2020 03:55 PM UTC
Hi Khanh,
Thanks for contacting Syncfusion Support,
Query 1: Assign Multiline TextboxExt to the editcontrol
You can achieve it by assigning the Editcontrol text to the TextBoxExt.Please find the code snippet below.
|
TextBoxExt textBox = new TextBoxExt() { Dock = DockStyle.Fill, Text = "TextBox Added", ForeColor = Color.White, BackColor = Color.Gray };
editControl1.Text = textBox.Text;
|
Query 2:Change border color
You can change the border colour using SetTextborder property.Please find the code snippet below.
|
this.editControl1.SetTextBorder(new Point(1, 1), new Point(8, 8), Color.DarkRed, FrameBorderStyle.DashDot, BorderWeight.Double);
|
Query 3:Set font for EditControl
We have applied the font to the edit control using the the following code “editControl1.Font = new Font("Calibri",28)”.It is not applying for us.We will check and update you the details by 6th Nov 2020.
Query 4: how to ignore autoformat text as image ()
AutoFormatText-Autoformats the given range of text [AutoFormatText(int iStartLineIndex,int iEndLineIndex)] .Can you please share how you are using this AutoFormatText in your sample.Please share us more details on it. It would be helpful for us to provide a prompt solution on this.
Please check the sample and the Properties link for your reference.
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/EditControl_queries-1958068037
Properties Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Edit-legacy-Document-595903490-181465347
Please let us know if you have anyother concerns.
Regards,
Bharathi R
TG
The GridLock
November 6, 2020 03:31 PM UTC
Hello Bharathi R,
Let me explain because the question is not clear
Question2: I want to change the border color of the editcontrol (not textborder)
question4: I want to ignore the text formatting (text is defined as in textboxext (no color, bold, italic), ... ignore any formats!
BR
Bharathi Rajakantham
Syncfusion Team
November 6, 2020 04:28 PM UTC
Hi Khanh,
Thanks for your Patience,
Query 1:Set Font for EditControl
Font can be applied by using the format.font.Please check the code snippet below.
|
(editControl1.Language as Syncfusion.Windows.Forms.Edit.Implementation.Config.ConfigLanguage).Format.Font = new Font("Calibri", 22);
|
Query 2:Change Border Color of EditBox
We are checking the query from our side we will update you the further details on 10th nov 2020.
Query 3:Ignore AutoFormatText
You can ignore the Autoformattext language.remove using.Please find the documentation link for your reference.
Documentation link : https://help.syncfusion.com/windowsforms/syntax-editor/syntax-highlighting#format
|
this.editControl1.Language.Remove("String");
|
Sample Link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/EditControl839227023
Please let us know if you have anyother concerns.
Regards,
Bharathi R
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
- Marked answer
-
TG The GridLock
- Nov 2, 2020 04:06 PM UTC
- Nov 6, 2020 04:28 PM UTC