Search Results

Search found 53 results on 3 pages for 'richtext'.

Page 1/3 | 1 2 3  | Next Page >

  • Validating the SharePoint InputFormTextBox / RichText Editor using JavaScript

    - by Jignesh Gangajaliya
    In the previous post I mentioned about manipulating SharePoint PeoplePicker control using JavaScript, in this post I will explain how to validate the InputFormTextBox contol using JavaScript. Here is the nice post by Becky Isserman on why not to use RequiredFieldValdator or InputFormRequiredFieldValidator with InputFormTextbox. function ValidateComments() {     //retrieve the text from rich text editor.     var text = RTE_GetRichEditTextOnly("<%= rteComments.ClientID %>");     if (text != "")     {         return true;     }     else     {         alert('Please enter your comments.');         //set focus back to the rich text editor.         RTE_GiveEditorFocus("<%= rteComments.ClientID %>");         return false;     }     return true; } <SharePoint:InputFormTextBox ID="rteComments" runat="server" RichText="true" RichTextMode="Compatible" Rows="10" TextMode="MultiLine" CausesValidation="true" ></SharePoint:InputFormTextBox> <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" OnClientClick="return ValidateComments()" CausesValidation="true" /> - Jignesh

    Read the article

  • Attach data to Richtext using flex, mysql and php(newbie)

    - by dmschenk
    I'm trying to attach data to a richtext field in Flashbuilder. The data is an html string in a mysql database and I'm connecting using php. The php script is just converting to XML. The connection works because I can easily dump the data to a datagrid and I can see the string. when I try to hook the data to a Richtext field I get "object CallResponder" so I am connected, but I'm not sure how to break it down so that it is just an html string for the text field. Thanks protected function creationCompleteHandler(event:FlexEvent):void { getAllAbout_fxResult.token = aboutfxService.getAllAbout_fx(); } <s:RichText x="10" y="10" text="{getAllAbout_fxResult}" creationComplete="creationCompleteHandler(event)" width="300" height="300"/>

    Read the article

  • Richtext Box formating help in WPF using c#.net

    - by Ashwin
    i am making a project for bulk emailing . In this I have added a richtext box . I want users to enter the email message body in it and want to give them the ability to format .Richtext box should be able to make the content bold,italics, underline , align it right left and center , increase font , decrease font,change color, change the font like Times New Roman depending on the click of the button. Help me how should i go about it. also let me know which references i should add to my project.its urgent guys . please help

    Read the article

  • C# Mouse option in richtext box

    - by Kasun
    Hi, I got richtext box on my windows application. then i write some text on it. Then i select relevant text and write click, i need to show mouse write click option called "Mark". After i click "Mark" option, i need to show the selected text on message box or in text box. I need C# ans....... :) Please help me.

    Read the article

  • redirect any results in command prompt to richtext box

    - by Kasun
    Hi all, I need to redirect any results in command prompt to richtext box. Can any one provide me the necessary steps. This is how i start my command prompt. ProcessStartInfo psi = new ProcessStartInfo { FileName = "cmd", Arguments = @"/k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat""", }; Process.Start(psi);

    Read the article

  • Edit and render RichText

    - by OregonGhost
    We have an application (a custom network management tool for building automation) that supports printing labels that you can cut out and insert into the devices' front displays. In earlier versions of the tool (not developed in my company), the application just pushed the strings into an Excel file that the field technician could then manipulate (like formatting text). We didn't do this in the new version because it was hard (impossible) to keep the Excel file in sync, and to avoid a binding to an external application (let alone different versions of Excel). We're using PDFSharp for rendering the labels. It has a System.Drawing-like interface, but can output to a System.Drawing.Graphics (screen / printer) as well as to a PDF file, which is a requirement. Later, basic formatting was introduced like Font Family, Style, Size, Color which would apply to one label (i.e. to exactly one string). Now the customer wants to be able to apply these formats to single characters in a string. I think the easiest way would be to support a subset of RichText. It's not as easy as I thought though. Currently the editor just displays a TextBox for the label you want to edit, with the font set to the label's font. I thought I'd just replace it with RichTextBox, and update the formatting buttons to use the RichTextBox formatting properties. Fairly easy. However, I need to draw the text. I know you can get the RichTextBox to draw to a HDC or System.Drawing.Graphics - but as already said, I need it to use PDFSharp. Rendering to bitmaps is not an option, since the PDF must not be huge, and it's a lot of labels. Unfortunately I couldn't get the RichTextBox to tell me the layout of the text - I'm fine with doing the actual rendering by hand, as long as I know where to draw what. This is the first question: How can I get the properly layouted metrics of the rich text out of a RichTextBox? Or is there any way to convert the rich text to a vector graphics format that can be easily drawn manually? I know about NRTFTree which can be used to parse and manipulate RichText. The documentation is bad (actually I don't know, it's Spanish), but I think I can get it to work. As far as I understood, it won't provide layouting as well. Because of this, I think I'll have to write a custom edit control (remember, it's basically just one or two line labels with basic RTF formatting, not a full-fledged edit control - more like editing a textbox in PowerPoint) and write custom text layout logic that used PDFSharp rather than System.Drawing for drawing. Is there any existing, even if partial, solution available, either for the editing or for doing the layout manually (or both)? Or is there an entirely different approach I'm just not seeing? Bonus points if exporting the label texts as RTF into a CSV file, and then importing in Excel retains the formatting. For the editing part, I need it to work in Windows Forms. Other than that it's not Windows-Forms-related, I think.

    Read the article

  • what architecture for implementing a richtext editor?

    - by genesys
    Hi! Can someone give me some hints on how a clean implementation (designwise) of a richtext editor could look like that allows for things like setting fonts, setting character colors and so on? And when and how are characters rendered? are characters rendered only once and the bitmap representation is cached? Is there any article or book covering what software design would be appropriate for that? background is that we're working on a text editing software for a language that cannot be displayed with unicode any hint is appreciated! thanks!

    Read the article

  • Displaying RichText in Crystal Reports

    - by KevB
    I have a report created in Crystal (the version that comes with Visual Studio 2005) that contains an IFieldObject that I want to use to display some rich text. I have set the TextFormat of the IFieldObject to crRTFText, however when I run the report the textbox displays all the rtf markup rather than actually displaying the formatted text. Is there some other settings that need to be changed in order for Crystal to display rich text?

    Read the article

  • Retrieving Encrypted Rich Text file and showing it in a RichTextBox C#

    - by Ranhiru
    OK, my need here is to save whatever typed in the rich text box to a file, encrypted, and also retrieve the text from the file again and show it back on the rich textbox. Here is my save code. private void cmdSave_Click(object sender, EventArgs e) { FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); AesCryptoServiceProvider aes = new AesCryptoServiceProvider(); aes.GenerateIV(); aes.GenerateKey(); aes.Mode = CipherMode.CBC; TextWriter twKey = new StreamWriter("key"); twKey.Write(ASCIIEncoding.ASCII.GetString(aes.Key)); twKey.Close(); TextWriter twIV = new StreamWriter("IV"); twIV.Write(ASCIIEncoding.ASCII.GetString(aes.IV)); twIV.Close(); ICryptoTransform aesEncrypt = aes.CreateEncryptor(); CryptoStream cryptoStream = new CryptoStream(fs, aesEncrypt, CryptoStreamMode.Write); richTextBox1.SaveFile(cryptoStream, RichTextBoxStreamType.RichText); } I know the security consequences of saving the key and iv in a file but this just for testing :) Well, the saving part works fine which means no exceptions... The file is created in filePath and the key and IV files are created fine too... OK now for retrieving part where I am stuck :S private void cmdOpen_Click(object sender, EventArgs e) { OpenFileDialog openFile = new OpenFileDialog(); openFile.ShowDialog(); FileStream openRTF = new FileStream(openFile.FileName, FileMode.Open, FileAccess.Read); AesCryptoServiceProvider aes = new AesCryptoServiceProvider(); TextReader trKey = new StreamReader("key"); byte[] AesKey = ASCIIEncoding.ASCII.GetBytes(trKey.ReadLine()); TextReader trIV = new StreamReader("IV"); byte[] AesIV = ASCIIEncoding.ASCII.GetBytes(trIV.ReadLine()); aes.Key = AesKey; aes.IV = AesIV; ICryptoTransform aesDecrypt = aes.CreateDecryptor(); CryptoStream cryptoStream = new CryptoStream(openRTF, aesDecrypt, CryptoStreamMode.Read); StreamReader fx = new StreamReader(cryptoStream); richTextBox1.Rtf = fx.ReadToEnd(); //richTextBox1.LoadFile(fx.BaseStream, RichTextBoxStreamType.RichText); } But the richTextBox1.Rtf = fx.ReadToEnd(); throws an cryptographic exception "Padding is invalid and cannot be removed." while richTextBox1.LoadFile(fx.BaseStream, RichTextBoxStreamType.RichText); throws an NotSupportedException "Stream does not support seeking." Any suggestions on what i can do to load the data from the encrypted file and show it in the rich text box?

    Read the article

  • [C#] how do I get the height of a rich text content after word wrap?

    - by Led
    Question A. Given 1. A string in rich text format that may have paragraph, tabs, space, line break, indentation, (or even image?) 2. A width for the word wrapping rich text control/editor How do I know the height of the content after it have performed all the word wrapping? Is there something like int MeasureRichTextHeightAfterWordWrap(string aRichTextContent, int aWidth)? Otherwise how does those rich text control know how much to autosize? Do I have to actually place the content on a dummy rich text control and get its height afterwards? Question B. Similar to question A but in plain text onto a plain text memo/control/editor. And manually draw string with manually calculated indentations, breaks, word wrappings. Is it easier or harder?

    Read the article

  • how do I get the height of a rich text content after word wrap?

    - by Led
    Question A. Given 1. A string in rich text format that may have paragraph, tabs, space, line break, indentation, (or even image?) 2. A width for the word wrapping rich text control/editor How do I know the height of the content after it have performed all the word wrapping? Is there something like int MeasureRichTextHeightAfterWordWrap(string aRichTextContent, int aWidth)? Otherwise how does those rich text control know how much to autosize? Do I have to actually place the content on a dummy rich text control and get its height afterwards? Question B. Similar to question A but in plain text onto a plain text memo/control/editor. And manually draw string with manually calculated indentations, breaks, word wrappings. Is it easier or harder?

    Read the article

  • Qt4: QPrinter / QPainter only prints the first document

    - by hurikhan77
    The problem is that my application only prints the first document fine. The second document is empty, only the page number is printed, the rest of the page is empty. In Qt4, I'm initializing the printer in the main.cpp in the following way: mw->printer = new QPrinter(QPrinter::HighResolution); mw->printer->setPaperSize(QPrinter::A5); mw->printer->setNumCopies(2); mw->printer->setColorMode(QPrinter::GrayScale); QPrintDialog *dialog = new QPrintDialog(mw->printer, mw); dialog->setWindowTitle(QObject::tr("Printer Setup")); if (dialog->exec() == QDialog::Accepted) { mw->printer->setFullPage(TRUE); return a.exec (); } This works fine for printing the first document from the application: qDebug("Printing"); QPainter p; if (!p.begin(printer)) { qDebug("Printing aborted"); return; } Q3PaintDeviceMetrics metrics(p.device()); int dpiy = metrics.logicalDpiY(); int dpix = metrics.logicalDpiX(); int tmargin = (int) ((marginTop / 2.54) * dpiy); int bmargin = (int) ((marginBottom / 2.54) * dpiy); int lmargin = (int) ((marginLeft / 2.54) * dpix); int rmargin = (int) ((marginRight / 2.54) * dpix); QRect body(lmargin, tmargin, metrics.width() - (lmargin + rmargin), metrics.height() - (tmargin + bmargin)); QString document; /* ... app logic to write a richtext document */ Q3SimpleRichText richText(QString("<qt>%1</qt>").arg(document), QFont("Arial", fontSize)); richText.setWidth(&p, body.width()); QRect view(body); int page = 1; do { // draw text richText.draw(&p, body.left(), body.top(), view, colorGroup()); view.moveBy(0, body.height()); p.translate(0, -body.height()); // insert page number p.drawText(view.right() - p.fontMetrics().width(QString::number(page)), view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page)); // exit loop on last page if (view.top () >= richText.height ()) break; printer->newPage(); page++; } while (TRUE); if (!p.end()) qDebug("Print painter yielded failure"); But when this routine runs the second time, it does not print the document. It will just print an empty page but still with the page number on it. This worked fine before with Qt3.

    Read the article

  • Qt4: QPrinter / QPainter only print the first document

    - by hurikhan77
    In Qt4, I'm initializing the printer in the main.cpp in the following way: mw->printer = new QPrinter(QPrinter::HighResolution); mw->printer->setPaperSize(QPrinter::A5); mw->printer->setNumCopies(2); mw->printer->setColorMode(QPrinter::GrayScale); QPrintDialog *dialog = new QPrintDialog(mw->printer, mw); dialog->setWindowTitle(QObject::tr("Printer Setup")); if (dialog->exec() == QDialog::Accepted) { mw->printer->setFullPage(TRUE); return a.exec (); } This works fine for printing the first document from the application: qDebug("Printing"); QPainter p; if (!p.begin(printer)) { qDebug("Printing aborted"); return; } Q3PaintDeviceMetrics metrics(p.device()); int dpiy = metrics.logicalDpiY(); int dpix = metrics.logicalDpiX(); int tmargin = (int) ((marginTop / 2.54) * dpiy); int bmargin = (int) ((marginBottom / 2.54) * dpiy); int lmargin = (int) ((marginLeft / 2.54) * dpix); int rmargin = (int) ((marginRight / 2.54) * dpix); QRect body(lmargin, tmargin, metrics.width() - (lmargin + rmargin), metrics.height() - (tmargin + bmargin)); QString document; /* ... app logic to write a richtext document */ Q3SimpleRichText richText(QString("<qt>%1</qt>").arg(document), QFont("Arial", fontSize)); richText.setWidth(&p, body.width()); QRect view(body); int page = 1; do { // draw text richText.draw(&p, body.left(), body.top(), view, colorGroup()); view.moveBy(0, body.height()); p.translate(0, -body.height()); // insert page number p.drawText(view.right() - p.fontMetrics().width(QString::number(page)), view.bottom() + p.fontMetrics().ascent() + 5, QString::number(page)); // exit loop on last page if (view.top () >= richText.height ()) break; printer->newPage(); page++; } while (TRUE); if (!p.end()) qDebug("Print painter yielded failure"); But when this routine runs the second time, it does not print the document. It will just print an empty page but still with the page number on it. This worked fine before with Qt3.

    Read the article

  • Retrieving inline images from Lotus notes using lotusscript

    - by Nazrul
    I have some NotesDocument where some RichText fields have both text and inline images. I can get text part of that items but can't retrieve inline images using lotusscript. Could any one please suggest me a way to retrieve inline images from that documents. LotusScript code: Sub Click(Source As Button) Dim session As New NotesSession Dim db As NotesDatabase Dim mainDoc As NotesDocument Dim v As NotesView Set db = session.CurrentDatabase Dim fileName As String Dim fileNum As Integer fileNum% = Freefile() fileName$ = "D:\data.txt" Open FileName$ For Append As fileNum% Set v = db.GetView("MyView") Set mainDoc = v.GetFirstDocument While Not ( mainDoc Is Nothing ) Forall i In mainDoc.Items If i.Type = RICHTEXT Then Write #fileNum% , i.Name & ":" & i.text 'how the images?? End If End Forall Set mainDoc = v.GetNextDocument( mainDoc ) Wend End Sub Thanks.

    Read the article

  • How to make a transition in flex 4 on a fill that contains a linear gradient?

    - by Totty
    <?xml version="1.0" encoding="utf-8"?> <s:Rect id="background" top="0" right="0" bottom="0" left="0" height="30"> <s:fill> <s:SolidColor color="#000000"/> </s:fill> <s:fill.over> <s:LinearGradient rotation="90"> <s:GradientEntry color="#FF5800" alpha="1.0" ratio="0"/> <s:GradientEntry color="#EE0202" alpha="1.0" ratio="1"/> </s:LinearGradient> </s:fill.over> <s:fill.down> <s:LinearGradient rotation="90"> <s:GradientEntry color="#EE0202" alpha="1.0" ratio="0"/> <s:GradientEntry color="#AF0000" alpha="1.0" ratio="1"/> </s:LinearGradient> </s:fill.down> </s:Rect> <s:RichText id="labelDisplay" paddingLeft="10" paddingRight="10" textAlign="center" fontFamily="Myriad Pro" fontSize="16" tabStops="S0 S50 S100 S150" color="#FFFFFF" y="8" color.over="#000000" tabStops.over="S0 S50 S100 S150" color.down="#000000" tabStops.down="S0 S50 S100 S150" color.disabled="#EE0202" tabStops.disabled="S0 S50 S100 S150" color.up="#EE0202" tabStops.up="S0 S50 S100 S150"> <s:filters> <s:DropShadowFilter includeIn="over" blurX="0" blurY="0" distance="1" hideObject="false" inner="false" color="#FFFFFF" strength="1" alpha="1" quality="2" knockout="false" angle="45.0"/> <s:DropShadowFilter includeIn="down" blurX="0" blurY="0" distance="1" hideObject="false" inner="false" color="#CCCCCC" strength="1" alpha="1" quality="2" knockout="false" angle="45.0"/> <s:BlurFilter includeIn="disabled" blurX="4.0" blurY="4.0" quality="2"/> </s:filters> </s:RichText> here is the code, I would like to make a smooth transition when enters the "over" state. any help?

    Read the article

  • Sharepoint InputFormTextBox not working on updatepanel?

    - by James123
    I have two panels in update panel. In panel1, there is button. If I click, Panel1 will be visible =false and Panel2 will be visible=true. In Panel2, I placed SharePoint:InPutFormTextBox. It not rendering HTML toolbar and showing like below image. <SharePoint:InputFormTextBox runat="server" ID="txtSummary" ValidationGroup="CreateCase" Rows="8" Columns="80" RichText="true" RichTextMode="Compatible" AllowHyperlink="true" TextMode="MultiLine" /> http://i700.photobucket.com/albums/ww5/vsrikanth/careersummary-1.jpg

    Read the article

  • Apply Font Formatting to PowerPoint Text Programatically

    - by OneNerd
    I am trying to use VBA to insert some text into a PowerPoint TextRange, I use something like this: ActiveWindow.Selection.SlideRange.Shapes("rec1").TextFrame.TextRange.Text = "Hi" However, I can't figure out how to apply bold, italic and underline programatically (I don't see a .RichText property or something similar). What I have is some simple HTML text with bold, italic and underlined text I would like to convert over. Does anyone know how to do this?

    Read the article

  • Text layout framework - wrapping

    - by Eran
    Hi , I would like to use the new richtext component however i notice it does not support text wrapping , anyone knows if it will be implemented sometime ? or is there any way to work arround it ? Thanks

    Read the article

  • Rich text box in Crystal Reports

    - by Reddy
    I have created rich text box in crystal reports for displaying product description. Everything is displaying properly but it is not taking more than 65534 characters. I need to display more than 65534, so please any one can help me to use is there any other control like richtext box to display the data.

    Read the article

1 2 3  | Next Page >