Search Results

Search found 256 results on 11 pages for 'multiline'.

Page 8/11 | < Previous Page | 4 5 6 7 8 9 10 11  | Next Page >

  • TextField - behave like PowerPoint

    - by user310113
    I have a Dynamic TextField created with ActionScript (multiline, wordwrap & autosize=true). While running the SWF, if you click into the TextField you get an arrow "move" cursor, then you can double-click to put it into Edit mode to select text. I want it to work like PowerPoint - if you click into the box you'll always get a flashing cursor with the ability to select/insert text, and you can click on the borders to drag, or the corners to resize. I tried adding the focusIn event textField.stage.focus = this.textField but this didn't seem to do anything. When you click into the textField, I basically want it to act as though you followed with a double-click (Edit mode) without actually having to do the double-click. Bonus: and instead of a 2nd double-click returning you to the Move mode (or whatever it's called) I want to select all text. TL;DR: Is there some property of a Dynamic TextField that I can get/set to see if I'm in Edit or Move mode?

    Read the article

  • Non breaking lengthy word.

    - by Madhu
    Hi friends, Please dont mind for adding a vulnarable content as below. jffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj I have a multiline html text editor(tiny mce). When a user enters unappropriate words, as i entered above!. It will be saved properly in database. When i am trying to display the same data using a label. The displayed data disturbs the page design. How can i fix this issue? Please provide me a solution for this. Thanks in advance Regards, Madhu BN

    Read the article

  • php echo doesnt print newlines

    - by Skun
    Hey ! I started doing a new project in PHP / MySql . The Aim of this project is to manage articles for a magazine that i am the editor of. So the content of the articles, i decided i would store with the "TEXT" column type of MySql Now when i retrieve this column and print it with echo, the newlines are not there. Its all on the same line. $resset = mysql_query("select txt from articles where id = 1"); $row = mysql_fetch_assoc($resset); $txt = $row['txt']; echo $txt; //doesnt print it as it is in the database as it was typed (multiline) Find below, the text as it looks in the database and as it looks when it is echoed But within the database, its stored with newlines. Has anybody else encountered this problem? Please help me as my project depends on this :|

    Read the article

  • jQuery without domready

    - by Happy
    Searching for a way to add this code, after the <head> (or some <link stylesheet>) and before <body> is generated (created). $('body').append('<style type="text/css">\ // some // multiline // styles </style>'); There is no <body> without domready(), so its seems better to use head instead or something else. Append also can be replaced. Anybody knows how to do that? Thanks.

    Read the article

  • CueText equivalent for a TMemo

    - by JosephStyons
    I have this Delphi code to set the cue text of a control on my form: procedure TfrmMain.SetCueText(edt: TWinControl; cueText: string); const ECM_FIRST = $1500; EM_SETCUEBANNER = ECM_FIRST + 1; begin SendMessage(edt.Handle,EM_SETCUEBANNER,0, LParam(PWideChar(WideString(cueText)))); end; I want the same effect on a TMemo, but the MSDN document says: You cannot set a cue banner on a multiline edit control or on a rich edit control. Is there a standard way to have a cuetext effect on a TMemo, or do I have to fiddle with the OnEnter/OnExit events and roll my own?

    Read the article

  • How to achieve multiple grids like the SQL server Results pane

    - by Skun
    Hi guys ! I'm having problems with my project once again :( The front end is C# I need to support multiline querying like MS SQL server and when these queries are executed, naturally there are going to be multiple result sets. Getting the datatables respective to the results is not a problem, but how do i make it appear like its done in MS SQL server. One result set below the other and with a scroll bar? Should i bind it to a datagrid? If so how can i bind multiple tables to a datagrid ? and will it generate the scrollbars and the columns automatically? If i am not clear, please let me know and i'll try to be more clearer. ps: If anyone knows how this can be done with the XtraGridControl in devexpress that would be awesome ! :D

    Read the article

  • .NET Single Line Logging (ala Trace.Write/WriteLine) using Instrumentation.Logging

    - by KnownColor
    Hello Everyone, My question is whether it is possible to get line/multiline (very unsure of correct term for this) behaviour of the Trace.Write and Trace.WriteLine methods but using the Microsoft Instrumentation Logging framework in .NET 2.0. Desired Output Hello World! Oh Hai. What I Currently Have Trace.Write("Hello "); Trace.WriteLine("World!"); Trace.Write("Oh Hai."); I would prefer to use instrumentation to log rather than writing to a log file using Debug.Trace. EDIT: By Instrumentation Logging I mean using a 'loggingConfiguration' block in my App.config and writing Log Entries using using Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write(LogEntry logEntry); Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0 for example. Ta, KnownColor

    Read the article

  • How to execute in javascriptfunction in asp.net c#

    - by shree-khanal
    i have a textarea which i want to disable when I check a checkbox. I made a working demo in plain html and javascript, but When I am migrating to Asp.net, neither the function is being executed nor I can keep the onselect event in my check box. <asp:CheckBox ID="ChkOthers" runat="server" Text="Others(Please Explain)" Width="205px" AutoPostBack="True" OnCheckedChanged="ChkOthers_CheckedChanged" /></td> <asp:TextBox ID="TxtOtherReason" runat="server" MaxLength="1024" TextMode="MultiLine" ></asp:TextBox></td> i want to create client side validation when check box is checked textbox is enable else disable.

    Read the article

  • javascript in asp.net

    - by questionbank
    <asp:RadioButtonList ID="RdoBtnHasNotified" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="RdoBtnHasNotified_SelectedIndexChanged"> <asp:ListItem Value="1">Yes</asp:ListItem> <asp:ListItem Value="0" Selected="True">No</asp:ListItem> </asp:RadioButtonList> <asp:TextBox ID="TxtHowNotified" runat="server" TextMode="MultiLine" MaxLength="100"></asp:TextBox> i want to enable textbox by clicking on radiobuttonlist but i am not able to do so without making autopostback=true.how can i do it using javascript??

    Read the article

  • How to execute in JavaScript function in ASP.NET using C#

    - by shree-khanal
    i have a textarea which i want to disable when I check a checkbox. I made a working demo in plain HTML and JavaScript , but When I am migrating to Asp.net, neither the function is being executed nor I can keep the OnSelect event in my check box. <asp:CheckBox ID="ChkOthers" runat="server" Text="Others(Please Explain)" Width="205px" AutoPostBack="True" OnCheckedChanged="ChkOthers_CheckedChanged" /> <asp:TextBox ID="TxtOtherReason" runat="server" MaxLength="1024" TextMode="MultiLine" /> i want to create client side validation when check box is checked textbox is enable else disable.

    Read the article

  • How can I ignore C comments when I process a C source file with Perl?

    - by YoDar
    I'm running a code that read files, do some parsing, but need to ignore all comments. There are good explanations how to conduct it, like the answer to How can I strip multiline C comments from a file using Perl? $/ = undef; $_ = <>; s#/\*[^*]*\*+([^/*][^*]*\*+)*/|("(\\.|[^"\\])*"|'(\\.|[^'\\])*'|.[^/"'\\]*)#defined $2 ? $2 : ""#gse; print; My first problem is that after run this line $/ = undef; my code doesn't work properly. Actually, I don't know what it does. But if I could turn it back after ignoring all comments it will be helpful. In general, What is the useful way to ignore all comments without changing the rest of the code?

    Read the article

  • Javascript eval limits

    - by user117701
    Is there a limit to javascript's eval, like in lenght? I'm trying to build an app where you can store JS code in the DB, which you can later load and eval in order to execute it, but i'm reaching a limit. First of all, the code has to all be in one line. Any multiline statements are not executed. Next, i'm reaching a limit in length (i guess). If i execute the code manually, it works, but put that same code in the db, load it via ajax, and try to execute it, and it fails. Any ideas why?

    Read the article

  • Find and replace numbers in string with regex

    - by James
    What I'm trying to achieve is to replace the numbers in the string with a new values calculated from the (match * int). So the string input looks like: 500g Flour 14g Salt 7g Dry yeast 45ml Olive oil 309ml Water And the result should look like this: 1000g Flour 14g Salt 14g Dry yeast 90ml Olive oil 618 ml Water row["ingredients"] is a DataRow. This is where I'm at: System.Text.RegularExpressions. Regex.Replace(row["ingredients"].ToString(), @"[^/d]", Delegate(Match match) { return match * 2; }, RegexOptions.Multiline); Any solution is greatly appreciated.

    Read the article

  • How do I get the output of an Xcode user script to auto indent?

    - by John Gallagher
    The Problem I want to press a key when I have a line highlighted and convert from a single line: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; to a multiline statement: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; What I've Tried I've got a simple ruby script that almost gets me there. #!/usr/bin/env ruby s = STDIN.read s.gsub!(/(:.+?\w) (\w.+?)/,'\1' + "\n\t" +'\2') print s When I set the output to "Replace Selection", I get this: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; When I set the output to "Place on Clipboard", then paste it in, I get the desired result: JGLogEntry *logEntry = [JGLogEntry applicationNoWindowsFrom:date1 to:date2 intoMOC:mockRawMOC]; However, this is two keypresses which is clumsy. Any ideas how I can get the replaced text to obey Xcode's auto indent rules?

    Read the article

  • How do I make this linkButton custom component work?

    - by Adam
    package { import mx.controls.LinkButton; import flash.text.TextLineMetrics; public class multiLineLinkButton extends LinkButton { override protected function createChildren():void { super.createChildren(); if (textField){ textField.wordWrap = true; textField.multiline = true; } } override public function measureText(s:String):TextLineMetrics { textField.text = s; var lineMetrics:TextLineMetrics = textField.getLineMetrics(0); lineMetrics.width = textField.textWidth; lineMetrics.height = textField.textHeight; return lineMetrics; } } my issue here is if you use this component you will see that the text is bunched up into a very small area. It does not fill the entire width of the linkButton. Anyone know why this is happening?

    Read the article

  • StringCollection changes on Settings.Default.Reload()

    - by Ask
    In my app Settings.Default.test is a StringCollection. I don't understand why this code StringCollection col = new StringCollection(); col.Add("1\r\n2\r\n"); Settings.Default.test = col; Settings.Default.Save(); Settings.Default.Reload(); Changes my text 1\r\n2\r\n to 1\n2\n on Reload. Is it default behavior or what? How to restore multiline text in my textbox on restart of my application?

    Read the article

  • match word '90%' using regular expression

    - by amadhu
    Hi All, I want word '90%' to be matched with my String "I have 90% shares of this company". how can I write regular expression for same? I tried something like this: Pattern p = Pattern.compile("\\b90\\%\\b", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); Matcher m = p.matcher("I have 90% shares of this company"); while (m.find()){ System.out.println(m.group()); } but no luck. Can any one thow some lights on this? Many thanks, Archi

    Read the article

  • How to have a shell script available everywhere I SSH to

    - by aib
    I have a shell script which I simply cannot do without: bar from Theiling Online I use SSH a lot and on a variety of *nix servers. However, I am not a system administrator and usually don't have the time or privileges to install it on every server I connect to. It is apparently a very portable sh script and has command line options to export itself as a shell function, which got me thinking: Could I use one of OpenSSH's subjectively obscure features to export it everywhere I go? My first thought was to assign the source to an environment variable like BAR = "cat -v" and then execute it on the other side as `$BAR`, but 1) I can't even get the cat example to to work locally, 2) I don't know how to put the script's actual multiline source into an environment variable and 3) I have yet to see a machine with PermitUserEnvironment enabled. I guess I could even do with an ssh option to write a file called ~/bar at logon, but a more volatile solution would be better. Calling wget http://.../bar at logon would be unacceptable. Any ideas? P.S. Putty-specific solutions, though I doubt any would exist, are also fine.

    Read the article

  • Running Powershell from within SharePoint

    - by Norgean
    Just because something is a daft idea, doesn't mean it can't be done. We sometimes need to do some housekeeping - like delete old files or list items or… yes, well, whatever you use Powershell for in a SharePoint world. Or it could be that your solution has "issues" for which you have Powershell solutions, but not the budget to transform into proper bug fixes. So you create a "how to" for the ITPro guys. Idea: What if we keep the scripts in a list, and have SharePoint execute the scripts on demand? An announcements list (because of the multiline body field). Warning! Let us be clear. This list needs to be locked down; if somebody creates a malicious script and you run it, I cannot help you. First; we need to figure out how to start Powershell scripts from C#. Hit teh interwebs and the Googlie, and you may find jpmik's post: http://www.codeproject.com/Articles/18229/How-to-run-PowerShell-scripts-from-C. (Or MS' official answer at http://msdn.microsoft.com/en-us/library/ee706563(v=vs.85).aspx) public string RunPowershell(string powershellText, SPWeb web, string param1, string param2) { // Powershell ~= RunspaceFactory - i.e. Create a powershell context var runspace = RunspaceFactory.CreateRunspace(); var resultString = new StringBuilder(); try { // load the SharePoint snapin - Note: you cannot do this in the script itself (i.e. add-pssnapin etc does not work) PSSnapInException snapInError; runspace.RunspaceConfiguration.AddPSSnapIn("Microsoft.SharePoint.PowerShell", out snapInError); runspace.Open(); // set a web variable. runspace.SessionStateProxy.SetVariable("webContext", web); // and some user defined parameters runspace.SessionStateProxy.SetVariable("param1", param1); runspace.SessionStateProxy.SetVariable("param2", param2); var pipeline = runspace.CreatePipeline(); pipeline.Commands.AddScript(powershellText); // add a "return" variable pipeline.Commands.Add("Out-String"); // execute! var results = pipeline.Invoke(); // convert the script result into a single string foreach (PSObject obj in results) { resultString.AppendLine(obj.ToString()); } } finally { // close the runspace runspace.Close(); } // consider logging the result. Or something. return resultString.ToString(); } Ok. We've written some code. Let us test it. var runner = new PowershellRunner(); runner.RunPowershellScript(@" $web = Get-SPWeb 'http://server/web' # or $webContext $web.Title = $param1 $web.Update() $web.Dispose() ", null, "New title", "not used"); Next step: Connect the code to the list, or more specifically, have the code execute on one (or several) list items. As there are more options than readers, I'll leave this as an exercise for the reader. Some alternatives: Create a ribbon button that calls RunPowershell with the body of the selected itemsAdd a layout pageSpecify list item from query string (possibly coupled with content editor webpart with html that links directly to this page with querystring)WebpartListing with an "execute" columnList with multiselect and an execute button Etc!Now that you have the code for executing powershell scripts, you can easily expand this into a timer job, which executes scripts at regular intervals. But if the previous solution was dangerous, this is even worse - the scripts will usually be run with one of the admin accounts, and can do pretty much anything...One more thing... Note that as this is running "consoleless" calls to Write-Host will fail. Two solutions; remove all output, or check if the script is run in a console-window or not.  if ($host.Name -eq "ConsoleHost") { Write-Host 'If I agreed with you we'd both be wrong' }

    Read the article

  • How to handle this string in json?

    - by Pandiya Chendur
    I am storing a multiline textbox value in my db table... When i converted this value to json it gives me an error Error: unterminated string literal... My sample data was , I am fetching the row to my datatable and then converting it to json, public string GetJSONString(DataTable table) { StringBuilder headStrBuilder = new StringBuilder(table.Columns.Count * 5); for (int i = 0; i < table.Columns.Count; i++) { headStrBuilder.AppendFormat("\"{0}\" : \"{0}{1}¾\",", table.Columns[i].Caption, i); } headStrBuilder.Remove(headStrBuilder.Length - 1, 1); StringBuilder sb = new StringBuilder(table.Rows.Count * 5); sb.Append("{\""); sb.Append(table.TableName); sb.Append("\" : ["); for (int i = 0; i < table.Rows.Count; i++) { string tempStr = headStrBuilder.ToString(); sb.Append("{"); for (int j = 0; j < table.Columns.Count; j++) { table.Rows[i][j] = table.Rows[i][j].ToString().Replace("'", ""); tempStr = tempStr.Replace(table.Columns[j] + j.ToString() + "¾", table.Rows[i][j].ToString()); } sb.Append(tempStr + "},"); } sb.Remove(sb.Length - 1, 1); // trim last , sb.Append("]}"); return sb.ToString(); } The above method doen't seem to handle newline character... Any suggestion...

    Read the article

  • Remove appearance of TextField in droidText : Android

    - by AnujAroshA
    I am trying to create a PDF using droidText library. There I want to place some text content in the middle of the page but align to left. I was unable to do with Paragraph class and setAlignment() method. So I have decided to use TextField class. Below is the code I have used, Document document = new Document(PageSize.A4); try { PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + "TextFields.pdf")); document.open(); TextField tf = new TextField(writer, new Rectangle(100, 300, 200, 350), "Content"); tf.setText("This is the content of text field"); tf.setAlignment(Element.ALIGN_CENTER); tf.setOptions(TextField.MULTILINE | TextField.REQUIRED); PdfFormField field = tf.getTextField(); writer.addAnnotation(field); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } document.close(); Code works perfect, but the out put PDF file that I am getting has this TextField which can be editable and also change the font appearance when I am click on the TextField. I don't want that in to my final PDF. How can I remove that attribute? If it is not possible, is there any other way I can position some text in a PDF file using droidText library in Android?

    Read the article

  • IE7 CSS bug aligning <img> with text in a <ul>

    - by Artem Russakovskii
    I've been banging my ahead on this IE7 bug for the last few days and it's time to resort to the mind of the crowd. I have the following HTML and CSS: http://beerpla.net/for_www/ie7_test/test.html The goal is to have a <ul>, with each <li> containing a small icon and some text. Multiline text would be aligned to itself and not wrap under the image. I've tried using float:left on the image and a bunch of other things, and finally I thought the position:absolute would work for sure but in IE7 I consistently see the text pop off to the next line and get misaligned with the image: This is what I expect it to look like: I even tried to make the div display:inline which kind of worked but then started wrapping under the image for long lines, so it was no good. zoom:1 also produced a similar effect. I'm at a loss at the moment. This code works fine in all other browsers. IE7 is a special, very special child. Any ideas? Thank you. Edit: If you have IE8, you can emulate IE7 by pressing F12 and then Alt-7.

    Read the article

  • scraping website with javascript cookie with c#

    - by erwin
    Hi all, I want to scrap some things from the following site: http://www.conrad.nl/modelspoor This is my function: public string SreenScrape(string urlBase, string urlPath) { CookieContainer cookieContainer = new CookieContainer(); HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(urlBase + urlPath); httpWebRequest.CookieContainer = cookieContainer; httpWebRequest.UserAgent = "Mozilla/6.0 (Windows; U; Windows NT 7.0; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.9 (.NET CLR 3.5.30729)"; WebResponse webResponse = httpWebRequest.GetResponse(); string result = new System.IO.StreamReader(webResponse.GetResponseStream(), Encoding.Default).ReadToEnd(); webResponse.Close(); if (result.Contains("<frame src=")) { Regex metaregex = new Regex("http:[a-z:/._0-9!?=A-Z&]*",RegexOptions.Multiline); result = result.Replace("\r\n", ""); Match m = metaregex.Match(result); string key = m.Groups[0].Value; foreach (Match match in metaregex.Matches(result)) { HttpWebRequest redirectHttpWebRequest = (HttpWebRequest)WebRequest.Create(key); redirectHttpWebRequest.CookieContainer = cookieContainer; webResponse = redirectHttpWebRequest.GetResponse(); string redirectResponse = new System.IO.StreamReader(webResponse.GetResponseStream(), Encoding.Default).ReadToEnd(); webResponse.Close(); return redirectResponse; } } return result; } But when i do this i get a string with an error from the website that it use javascript. Does anybody know how to fix this? Kind regards Erwin

    Read the article

  • [SOLVED] flash 10, as3 - save text of textarea and reuse it to replace text in textarea

    - by user427969
    hi everyone Is it possible to save text of textarea (flash 10, as3, cs5) in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea? I tried saving htmlText of textarea but the problem is when i replace it in textarea tags causes problem. There will always be another extra line. If anyone wants to view p tags problem try following. Just click on text and then move your down arrow key, cursor will go to next line. import fl.controls.TextArea; var txtHTML:TextArea = new TextArea(); txtHTML.move(0,0); var default_format:TextFormat = new TextFormat(); default_format.font = "Arial"; default_format.bold = false; default_format.align = "center"; default_format.color = 0xFFFF00; default_format.size = 14; var field:TextField = txtHTML.textField; field.defaultTextFormat = default_format; field.setTextFormat(default_format); field.alwaysShowSelection = true; field.background = true; field.type = 'input'; field.multiline = true; field.backgroundColor = 0x777777; field.embedFonts = true; txtHTML.htmlText = '<P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#FFFF00" LETTERSPACING="0" KERNING="0">ASDF</FONT></P>'; field.x = 0; field.y = 0; field.width = 400; field.height = 200; field.text = ""; addChild(txtHTML); Is there a way to do this? Thanks alot for any help. Regards

    Read the article

  • Using regex to extract variables from a plain-text form letter?

    - by Yaaqov
    Hi - I'm looking for a good example of using Regular Expressions in PHP to "reverse engineer" a form letter (with a known format, of course) that has been pasted into a multiline textbox and sent to a script for processing. So, for example, let's assume this is the original plain-text input (taken from a USDA press release): WASHINGTON, April 5, 2010 - North American Bison Co-Op, a New Rockford, N.D., establishment is recalling approximately 25,000 pounds of whole beef heads containing tongues that may not have had the tonsils completely removed, which is not compliant with regulations that require the removal of tonsils from cattle of all ages, the U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) announced today. For clarity, the fields that are variables are highlighted below: [pr_city=]WASHINGTON, [pr_date=]April 5, 2010 - [corp_name=]North American Bison Co-Op, a [corp_city=]New Rockford, [corp_state=]N.D., establishment is recalling approximately [amount=]25,000 pounds of [product=]whole beef heads containing tongues that may not have had the tonsils completely removed, which is not compliant with regulations that require [reason=]the removal of tonsils from cattle of all ages, the U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) announced today. How could I efficiently extract the contents of the pr_city pr_date corp_name corp_city corp_state amount product reason fields from my example? Any help would be appreciated, thanks.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11  | Next Page >