Jump to content

Search the Community

Showing results for tags 'text'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

There are no results to display.

Forums

  • Welcome to Smart Mobile Studio
    • News and Information
    • Pre-Sales Questions
    • Smart In the Media
    • Smart Contests
    • Meta
  • Smart Mobile Studio Discussion
    • General
    • IDE
    • RTL
    • Code
    • Client Server
    • Platform
    • Graphics
    • Deployment
    • Suggestion box
  • Smart Mobile Studio support
    • Support
    • Bug report
  • General Discussion
    • Pascal
    • Delphi
    • Javascript
    • HTML/HTML5
    • CSS
  • Resources
    • Website
    • Download Smart Mobile Studio

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Company name


Position

Found 5 results

  1. lynkfs

    wysiwyg

    Was looking for an easy to make wysiwyg editor. This one is based on 'document.designMode'. Mozilla: "When an HTML document has been switched to designMode, its document object exposes an execCommand method to run commands that manipulate the current editable region" IFrame's have an innate document element which can be used for that purpose. Have a form with an IFrameHtmlElement and 2 buttons ('bold' and 'italic') : procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components W3IframeHtmlElement1.handle.contentDocument.designMode := 'on'; W3IframeHtmlElement1.handle.contentDocument.body.innerHTML := 'this is some text'; W3IframeHtmlElement1.handle.focus(); end; procedure TForm1.W3Button1Click(Sender: TObject); //bold begin W3IframeHtmlElement1.handle.contentDocument.execCommand('bold', false, null); W3IframeHtmlElement1.handle.focus(); end; procedure TForm1.W3Button2Click(Sender: TObject); //italic begin W3IframeHtmlElement1.handle.contentDocument.execCommand('italic', false, null); W3IframeHtmlElement1.handle.focus(); end; Besides 'bold' and 'italic' execCommand supports a host of other edit commands as well. see https://codepen.io/chrisdavidmills/full/gzYjag/
  2. IElite

    Scrolling large amounts of text.

    I need to place a large amount of text that needs to be placed in a control and placed on my form. The text needs to able to be word wrapped and scroll-able. However, I do not want visible scrollbars such as seen in a TW3Memo. Can I use TW3ScrollControl for this? I have no idea how much text will be there, but at the most three large paragraphs. The text will need to word wrap based on the size of the control holding the text. I tried using a TW3Label but it seems it has no wrapping procedure TForm1.InitializeForm; var s: string; i: integer; begin inherited; // this is a good place to initialize components fScroll.SetBounds(0,0, ClientWidth, ClientHeight); fScroll.Content.SetBounds(0,0, clientWidth, clientHeight); fText.SetBounds(0,0, fScroll.clientWidth, fScroll.clientHeight); for i:= 1 to 10000 do s:= s + intToStr(i) + ' '; fText.Caption:= s; end; procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} fScroll:= TW3ScrollControl.Create(self); fText:= TW3Label.Create(fScroll.Content); end; I then tried placing it in the scroll control's InnerHtml procedure TForm1.InitializeForm; var s: string; i: integer; begin inherited; // this is a good place to initialize components fScroll.SetBounds(0,0, ClientWidth, ClientHeight); fScroll.Content.SetBounds(0,0, clientWidth, clientHeight); for i:= 1 to 10000 do s:= s + intToStr(i) + ' '; fScroll.Content.InnerHTML:= '<html> <body> <p>' + S + '</p> </body> </html>';} end; that wraps, but does not scroll beyond the height of the scroll control. Again, I do not know the height of the text at any point, cause of the device size, layout, and amount of text wrapped within. If I set it to some arbitrary such as 5000, then i have extra area to scroll - with no text e.g. fScroll.Content.SetBounds(0,0, clientWidth, 5000); is there a way to place text in a scroll, make it wrap, and make it scroll to the end of its content without any extra space at end (well, there could be a little extra) here is my code here is my demo The #1 president has a large amount of text - so when viewed in a smaller device, or resized browser window, you will see my dilema thanx
  3. Hi I am trying to import content from a text ot CSV file located in the phone. Is there a way to locate the file and then read the text content into a memo or text variable? I have seen the JavaScript FileReader object in blogs but I don't know how to use it in SmartMobileStudio. Any ideas?
  4. Hi. Is there a way to read a .txt file from the /res folder into a string variable or memo field?
  5. COMFIED

    Label Text Wrap

    How can I modify the properties of W3label so that the caption text auto-wraps into multiple lines (like a memo) while aligned to top-left?
×