How to lock and disable encoding in Editcontrol

Is there any way to lock the encoding text automatically in EditControl? When I ener unsupported chacracter with "US-ASCII", EditControl will automatically switch encoding to "Unicode". But I don't wan't so, is there any solution? Thanks for reading!

Here is example images


4 Replies 1 reply marked as answer

TB Thirupathi Bala Krishnan Syncfusion Team December 31, 2021 12:17 PM UTC

Hi Hoang, 
 
We currently do not have any options for disabling the encoding text. However, you can hide the encoding panel. To meet this need, set the StatusBarSettings.EncodingPanel Visible property value to false. The StatusBarSettings property contains many sub properties to customize the appearance and visibility of the status bar and its panels. Now the encoding panel should no longer be shown in the edit control's status bar. 
 
Please refer the following code sample. 
 
# Form1.cs

            public Form1() 
            { 
                    InitializeComponent(); 
                    this.editControl1.StatusBarSettings.Visible = true; 
                     this.editControl1.StatusBarSettings.TextPanel.Visible = true; 
                     this.editControl1.StatusBarSettings.StatusPanel.Visible = true; 
                     this.editControl1.StatusBarSettings.EncodingPanel.Visible = false; 
                     this.editControl1.StatusBarSettings.CoordsPanel.Visible = true; 
                     this.editControl1.StatusBarSettings.InsertPanel.Visible = true; 
         } 
 
 
 
Sample link: https://www.syncfusion.com/downloads/support/forum/171579/ze/EditFeaturesDemo323026832

Please let us know if you need any further assistance.
 
 
Regards,
Thirupathi B.
 



HD Hoang Duy Long replied to Thirupathi Bala Krishnan December 31, 2021 02:29 PM UTC

Thanks for the help, but I want when I type "ư" in the US_ASCII encoding it will show "??" but instead the EditControl converts Unicode to match that character, I don't want that. I just want them to be displayed only characters supported in the US_ASCII encoding



TB Thirupathi Bala Krishnan Syncfusion Team January 3, 2022 02:10 PM UTC

Hi Hoang, 

Thanks for the update. 

Currently we are validating the reported query in our end. We need some more time to resolve the reported issue in our end. So we’ll provide the further details on January 4, 2022.  We appreciate your patience until then. 

Meanwhile, could you please share your screenshots or send the replication videos for the reported scenario so that we can provide a solution as soon as possible? It will be beneficial to us in providing a solution. 

Regards,
Thirupathi B. 



TB Thirupathi Bala Krishnan Syncfusion Team January 4, 2022 11:04 AM UTC

Hi Hoang, 

Thanks for your patience. 

We currently do not have any support for restricting Unicode-related characters. It's the default behaviour, and we've been following the implementation since the beginning. Because we permitted each and every text in our EditControl. We followed the behavior looks like NotePad++. As a result, we are unable to restrict the characters to a specific set. In addition, text cannot be save with the current encoding if you use specific unicode symbols. As a result, we changed the encoding type from US-ASCII to Unicode. You won't be able to meet this criteria with EditControl. 

Regards,
Thirupathi B. 


Marked as answer
Loader.
Up arrow icon