We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

XML Schema Settings - Space Lexems??

Thread ID:

Created:

Updated:

Platform:

Replies:

131372 Jul 7,2017 03:20 AM UTC Jul 12,2017 06:56 AM UTC Windows Forms 6
loading
Tags: EditControl
Frank Hilton
Asked On July 7, 2017 03:20 AM UTC

Hi,
I am doing an html viewer using the Edit Control and WebBrowser control.
I have the schema correct for the Music Lyric Chords program I am making.
See attached
I want to display the chords in the exact place I put them in the source editor.
But, when I preview in html viewer, as you know.
Html only allows one space between character unless you use the ' ' code.
Q: How do I setup a lexem/split so that a space automatically inserts the ' ' code (unseen from user)
This way, when I do print preview the chords will stay where I put them.
Do able??

Attachment: lyriceditor01_9f9f7fb0.zip

Mallika Kannan [Syncfusion]
Replied On July 10, 2017 02:55 PM UTC

  
Hi Frank 
 
Thank you for contacting Syncfusion support. 
 
At present there is no default support to achieve this reported requirement and also this requirement is not related with Lexem/ Split features in EditControl. So we have achieved this reported requirement by work around 
 
Please make use of the below Code snippet. 
 
Code snippet 
 
//Refresh the File conten 
if (File.Exists(BasePath)) 
{ 
                File.Delete(BasePath); 
} 
//Load the file Content 
for (int i = 0; i < this.editControl1.Lines.Length; i++) 
{ 
                string line = this.editControl1.Lines[i].Replace(" ","&nbsp;&nbsp;"); 
                StreamWriter writer = new StreamWriter(BasePath, true); 
                writer.WriteLine(line); 
                writer.Close(); 
} 
//Load the Html file 
this.htmluiControl1.LoadHTML(BasePath); 
 
Screenshot 
 

 
We have prepared the sample and video for your reference. It can be downloaded from the below link, 
 
 
 
Kindly check with above and let us know if it helpful. 
 
Regards, 
Mallika 
 


Frank Hilton
Replied On July 10, 2017 02:59 PM UTC

I will check it out later... looks promising.

I will let you know!


Frank Hilton
Replied On July 10, 2017 04:24 PM UTC

The code you supplied worked as far as what it does... replace the spaces.

However, because of html technology itself, the chords are off from what they look like on the screen (in the editor).

So, this won't work.

I would use the default PrintPreview of .NET, but the toolbar looks ugly.

Even though that does work... I was hoping I could print preview on the PrintPreview Control, but it doesn't print in color because you have to specify the brush color.

And that would mean I would have to write code and parse the entire thing for just a color print out.


Thanks for you efforts!!


Frank Hilton
Replied On July 11, 2017 10:09 PM UTC

Attached are 2 screenshots. I will explain each one.

#01
Shows the edit control printed in full color using the >NET default PrintPreviewDialog.
However, the tool bar is ugly and I can't edit it.

#2
This is the output of the Edit control using the PrintPreviewControl
However, none of the chords are in RED.

Is there anyway to get the PrintPreviewControl to print whatever colors there are in the edit control??

If this can't be done....

Can outputting the Edit control content unto your PDF control work??
Maybe I can use the PDF as a Print Preview.


Attachment: PrintPreviewColor_e6912310.zip

Frank Hilton
Replied On July 12, 2017 01:21 AM UTC

Hello..... I GOT IT!!!

I dug into the PDF examples and had to tweak the code a little, but the PDF prints the Edit Control content PERFECT!!!

THANKS YOU!!!


Mallika Kannan [Syncfusion]
Replied On July 12, 2017 06:56 AM UTC

  
Hi Frank 
 
Thanks for your update. 
 
We are glad that we have helped you on this and please let us know if you need any further assistance. 
 
Regards, 
Mallika 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;