<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>REALbasic City &#187; Classes &amp; Controls</title>
	<atom:link href="http://realbasic.tutspolis.com/category/classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://realbasic.tutspolis.com</link>
	<description>Tutorials - Tutspolis.com</description>
	<lastBuildDate>Sat, 29 May 2010 23:10:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>REALbasic &#8211; StyledText Class</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-styledtext-class/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-styledtext-class/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 11:57:59 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[styledtext]]></category>
		<category><![CDATA[textarea]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=250</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 250, userID 0, combination 1 -->
			
				
			
		
The REALbasic StyledText Class enables you to apply style attributes to the TextArea Control. We can use it to create MS Word like application or syntax highlight for TextArea Control. Learn some basic about StyledText Class available in REALbasic.


StyledText Class in REALbasic
Because the TextArea already has selection style attributes, the StyledText class honors that information. [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 250, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-styledtext-class%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-styledtext-class%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>The REALbasic StyledText Class enables you to apply style attributes to the TextArea Control. We can use it to create MS Word like application or syntax highlight for TextArea Control. Learn some basic about StyledText Class available in REALbasic.</p>
<p><span id="more-250"></span></p>
<div style="margin-left:19px;float:left">
<h2>StyledText Class in REALbasic</h2>
<p>Because the TextArea already has selection style attributes, the StyledText class honors that information. This means that you can set the style information using the selection methods that are available within the TextArea class, and they will be reflected when getting StyleRun information (and vice versa). Not all of the style attributes for selections in the TextArea class are available in the StyleRun class, such as Outline, Condense, Shadow, and Extend. These were supported only on Mac OS &#8220;classic&#8221;.</p>
<h2>StyledText Class example in REALbasic</h2>
<p>The following example uses the methods of the StyledText class to mark up and align text and display it in a TextArea. In order for the styled text to display, you must turn on the Multiline and Styled properties of the TextArea.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> Text <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>  // text <span style="color: #000080;">to</span> be displayed <span style="color: #000080;">in</span> TextArea
<span style="color: #000080;">Dim</span> st,ln <span style="color: #000080;">As</span> <span style="color: #000080;">Integer</span>  // start <span style="color: #000080;">and</span> length values of a paragraph
&nbsp;
//define four paragraphs <span style="color: #000080;">in</span> Text
Text = <span style="color: #800000;">&quot;This is the text that we are going to save &quot;</span> _
+<span style="color: #800000;">&quot;into our file from the TextArea.&quot;</span>+EndofLine _
+<span style="color: #800000;">&quot;Isn't that interesting?&quot;</span>+EndofLine _
+<span style="color: #800000;">&quot;Man, I sure do love using RB to take care of my projects.&quot;</span>+EndofLine _
+<span style="color: #800000;">&quot;That's because the RS Engineering staff is just so awesome!&quot;</span>
&nbsp;
TextArea1.StyledText.Text = text //four paragraphs <span style="color: #000080;">in</span> Text
TextArea1.StyledText.Bold(5, 2) = <span style="color: #000080;">True</span>
TextArea1.StyledText.TextColor(5, 2) = &amp;cFF0000 //bold <span style="color: #000080;">and</span> red
TextArea1.StyledText.Size( 7, 10) = 16
TextArea1.StyledText.Underline(12, 4) = <span style="color: #000080;">True</span> //16 pt underline
TextArea1.StyledText.Size(100, 4) = 18
TextArea1.StyledText.TextColor(100, 4) = &amp;cFF00FF //18 pt <span style="color: #000080;">and</span> Magenta
TextArea1.StyledText.Font(0, Len(text) ) = <span style="color: #800000;">&quot;Comic Sans MS&quot;</span>
&nbsp;
//center aliign second paragraph
TextArea1.StyledText.ParagraphAlignment(1)=Paragraph.AlignCenter 
//<span style="color: #000080;">set</span> this paragraph <span style="color: #000080;">in</span> Helveticta, 18 pt bold, red
//first <span style="color: #000080;">get</span> the start <span style="color: #000080;">and</span> length values <span style="color: #000080;">for</span> this paragraph...
st=TextArea1.StyledText.Paragraph(1).StartPos
ln=TextArea1.StyledText.Paragraph(1).Length+1
&nbsp;
//<span style="color: #000080;">next</span> apply attributes...
TextArea1.StyledText.Bold(st,ln)=<span style="color: #000080;">True</span>
TextArea1.StyledText.Font(st,ln)=<span style="color: #800000;">&quot;Helvetica&quot;</span>
TextArea1.StyledText.Size(st,ln)=18
TextArea1.StyledText.TextColor(st,ln)=&amp;cFF0000</pre></td></tr></table></div>

<h2>Save StyledText to file in REALbasic</h2>
<p>The following code, appended to the end of the previous method, saves the styled text to disk in RTF format. It assumes that the File Type Set, &#8220;TextTypes&#8221; has one item, TextRTF, that defines the RTF file type</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> s <span style="color: #000080;">As</span> TextOutputStream
<span style="color: #000080;">Dim</span> f <span style="color: #000080;">As</span> Folderitem
&nbsp;
f=GetSaveFolderItem(TextTypes.TextRtf,<span style="color: #800000;">&quot;TestSaveRTF&quot;</span>)
s=TextOutputStream.Create(f)
s.Write TextArea1.StyledText.RTFData
s.<span style="color: #000080;">Close</span></pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-styledtext-class/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>REALbasic &#8211; Speak Method</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-speak-method/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-speak-method/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 23:03:56 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[speak]]></category>
		<category><![CDATA[speech]]></category>
		<category><![CDATA[synthesizer]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=217</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 217, userID 0, combination 1 -->
			
				
			
		
REALbasic offers a Speak Method that allows us to use the computer&#8217;s speech synthesizer to pronounce the passed text string (Windows and Macintosh only). It&#8217;s very easy to use so lets look how Speak Method work. 


Speak Method in REALbasic
Speak takes a string (or any variant that can be expressed as a string) and uses [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 217, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-speak-method%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-speak-method%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>REALbasic offers a Speak Method that allows us to use the computer&#8217;s speech synthesizer to pronounce the passed text string (Windows and Macintosh only). It&#8217;s very easy to use so lets look how Speak Method work. </p>
<p><span id="more-217"></span></p>
<div style="margin-left:19px;float:left">
<h2>Speak Method in REALbasic</h2>
<p>Speak takes a string (or any variant that can be expressed as a string) and uses the Windows or Macintosh text-to-speech engine to speak the text. The speech is asynchronous, allowing normal program flow to continue. By default, subsequent calls to Speak before the first call has finished will queue up and speak after the completion of the previous call. If the optional interrupt flag is used and set to True, the previous Speak calls will be stopped immediately. Speak is not supported on Linux.</p>
<h2>Speak Method example</h2>
<p>We can for example read the text available in TextArea Control. I hope this example is clear to understand. If you like you can change some settings (like system voice, reading speed etc.) in System Preferences -&gt; Speech. I think that Windows offers also this kind of options somewhere.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">if</span> TextArea1.Text &lt; &gt; <span style="color: #800000;">&quot;&quot;</span> <span style="color: #000080;">then</span>
  speak TextArea1.Text
<span style="color: #000080;">else</span>
  speak <span style="color: #800000;">&quot;Please insert some text in TextArea because it's empty&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span></pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-speak-method/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>REALbasic &#8211; MoviePlayer Control</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-movieplayer-control/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-movieplayer-control/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 23:03:32 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[movieplayer]]></category>
		<category><![CDATA[quicktime]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[windows media player]]></category>
		<category><![CDATA[wmp]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=179</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 179, userID 0, combination 1 -->
			
				
			
		
MoviePlayer Control available in REALbasic displays a control for playing Quicktime and Windows Media Player movies. It can be also used as a MP3 player or PDF viewer. Let&#8217;s look into some REALbasic MoviePlayer Control examples.


MoviePlayer Control info
Windows uses the Windows Movie Player to play movies and Mac OS uses the QuickTime player. On Linux, [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 179, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-movieplayer-control%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-movieplayer-control%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>MoviePlayer Control available in REALbasic displays a control for playing Quicktime and Windows Media Player movies. It can be also used as a MP3 player or PDF viewer. Let&#8217;s look into some REALbasic MoviePlayer Control examples.</p>
<p><span id="more-179"></span></p>
<div style="margin-left:19px;float:left">
<h2>MoviePlayer Control info</h2>
<p>Windows uses the Windows Movie Player to play movies and Mac OS uses the QuickTime player. On Linux, the MoviePlayer uses GStreamer by default (it requires version 0,10+) and uses Xine if GStreamer is not available. </p>
<p>The Controller property dictates how the movie controls (if any) will be displayed. Passing 0 (zero) means that there will be no user controls available. Passing 1 means that a movie icon or badge will be displayed in the lower left corner of the movie area instead of the controller. When this badge is clicked by the user, the badge disappears and the regular movie controls appear at the bottom of the movie frame. Passing 2 displays the regular movie controls.</p>
<h2>Checking if QuickTime is installed in system</h2>
<p>Here you can find how to check if QuickTime is installed in system.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">if</span> System.QuickTime.Installed <span style="color: #000080;">then</span>
MsgBox <span style="color: #800000;">&quot;QuickTime detected!&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span></pre></td></tr></table></div>

<h2>Load a movie or MP3 to REALbasic MoviePlayer Control</h2>
<p>This example loads a movie called REALbasicMovie.mp4 from the current directory into MoviePlayer1 and plays it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> f <span style="color: #000080;">As</span> FolderItem
&nbsp;
f = GetFolderItem(<span style="color: #800000;">&quot;REALbasicMovie.avi&quot;</span>)
&nbsp;
MoviePlayer1.Movie = f.OpenAsMovie
MoviePlayer1.Play</pre></td></tr></table></div>

<h2>Get current MoviePlayer position</h2>
<p>Display the current video or audio position from MoviePlayer Control.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> p <span style="color: #000080;">As</span> <span style="color: #000080;">Double</span> //<span style="color: #000080;">Double</span> <span style="color: #000080;">is</span> a number that can contain a decimal value, i.e., a real number.
&nbsp;
p = MoviePlayer1.MovieController.Controls.CurrentPosition</pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-movieplayer-control/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Adding Toolbar to REALbasic project</title>
		<link>http://realbasic.tutspolis.com/classes/adding-toolbar-to-realbasic-project/</link>
		<comments>http://realbasic.tutspolis.com/classes/adding-toolbar-to-realbasic-project/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 19:06:18 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[popup]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[toolbar]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=148</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 148, userID 0, combination 1 -->
			
				
			
		
In this article we will learn how to add and use Toolbar Control in REALbasic project. Article covers the following topics: adding a item (push button, icon, separator, space) to Toolbar, adding actions on item click, adding a popup menu to Dropdown button. Watch it, learn it, enjoy it!


Add Toolbar Control to REALbasic Project
We start [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 148, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Fadding-toolbar-to-realbasic-project%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Fadding-toolbar-to-realbasic-project%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this article we will learn how to add and use Toolbar Control in REALbasic project. Article covers the following topics: adding a item (push button, icon, separator, space) to Toolbar, adding actions on item click, adding a popup menu to Dropdown button. Watch it, learn it, enjoy it!</p>
<p><span id="more-148"></span></p>
<div style="margin-left:19px;float:left">
<h2>Add Toolbar Control to REALbasic Project</h2>
<p>We start this tutorial with adding Toolbar Control to our REALbasic Project. We do this by clicking on Add Toolbar button available in Project Tab. </p>
<p><img src="http://realbasic.tutspolis.com/files/tutorials/addtoolbar.png" alt="Add Toolbar to REALbasic project" /></p>
<h3>Add items (buttons) to Toolbar</h3>
<p>To add items to REALbasic Toolbar control we double click on Toolbar1 in Project Tab and we should be in place similar to screenshot below. Now click on Add Tool item five times and set (in item Property and Value) for ToolItem1 Style = 0 Push button, ToolItem2 Style = 1 Separator, ToolItem3 Style = 2 Toggle button, ToolItem4 = 5 Space, ToolItem5 = 3 Dropdown button. You can also set the buttons text in Caption (I called items after the name of style). You can also add some graphics to the items. To do this look for icon property for selected Toolbar item.</p>
<p><img src="http://realbasic.tutspolis.com/files/tutorials/addtoolitem.png" alt="Add item to Toolbar" /></p>
<h2>Add Toolbar to Window Class</h2>
<p>The last thing before writing the code we will insert the Toolbar Control from Window1 GUI builder Control Panel. Go to Window1 and drag and drop from All Controls Toolbar1 to our application Window.</p>
<p><img src="http://realbasic.tutspolis.com/files/tutorials/toolbarcontrol.png" alt="REALbasic Toolbar Control" /></p>
<h2>Toolbar Control item actions</h2>
<p>To make something happen when the user will click on  one of Toolbar items we must add some code to Toolbar1 Sub Actions () in Code Editor. We can do this by Item Name or by Item Caption. In this step we will use the first option.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">select</span> <span style="color: #000080;">case</span> item
&nbsp;
<span style="color: #000080;">case</span> me.ToolItem1
  MsgBox <span style="color: #800000;">&quot;Push button item was pressed&quot;</span>
<span style="color: #000080;">case</span> me.ToolItem3
  MsgBox <span style="color: #800000;">&quot;Toggle button item was pressed&quot;</span>
&nbsp;
<span style="color: #000080;">end</span> <span style="color: #000080;">select</span></pre></td></tr></table></div>

<p>There can be a problem when you like to use item style Dropdown button&#8230; To get it work we must create a new MenuItem and attach it to this button style. Go to Toolbar1 Sub Open () and insert there:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> myMenu <span style="color: #000080;">as</span> <span style="color: #000080;">New</span> MenuItem
<span style="color: #000080;">Dim</span> myMenu1 <span style="color: #000080;">as</span> <span style="color: #000080;">New</span> MenuItem
<span style="color: #000080;">Dim</span> myMenu2 <span style="color: #000080;">as</span> <span style="color: #000080;">New</span> MenuItem
&nbsp;
MyMenu1.Text=<span style="color: #800000;">&quot;REALbasic CIty&quot;</span>
MyMenu2.Text=<span style="color: #800000;">&quot;qbap&quot;</span>
&nbsp;
MyMenu.<span style="color: #000080;">Append</span> myMenu1
MyMenu.<span style="color: #000080;">Append</span> myMenu2
&nbsp;
me.ToolItem4.DropdownMenu = myMenu</pre></td></tr></table></div>

<p>Now we should make some events when the user will click on any MenuItem in Dropdown button. Go to Toolbar1 Sub DropDownMenuAction () and enter:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">select</span> <span style="color: #000080;">case</span> hititem.Text
&nbsp;
<span style="color: #000080;">case</span> <span style="color: #800000;">&quot;qbap&quot;</span>
  MsgBox <span style="color: #800000;">&quot;You chose qbap&quot;</span>
<span style="color: #000080;">case</span> <span style="color: #800000;">&quot;REALbasic City&quot;</span>
  MsgBox <span style="color: #800000;">&quot;You chose REALbasic City&quot;</span>
&nbsp;
<span style="color: #000080;">end</span> <span style="color: #000080;">select</span></pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/adding-toolbar-to-realbasic-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>REALbasic &#8211; ProgressBar Control</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-progressbar-control/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-progressbar-control/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 20:54:03 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[progressbar]]></category>
		<category><![CDATA[realbasic]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=124</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 124, userID 0, combination 1 -->
			
				
			
		
ProgressBar Control available in REALbasic is a great tool to show a progress of some action in visual way. You can see this control for example in browsers on loading page, when you are coping a file in your system or extracting a document etc.


Changing ProgressBar value
If we like change a ProgressBar Control value to [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 124, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-progressbar-control%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-progressbar-control%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>ProgressBar Control available in REALbasic is a great tool to show a progress of some action in visual way. You can see this control for example in browsers on loading page, when you are coping a file in your system or extracting a document etc.</p>
<p><span id="more-124"></span></p>
<div style="margin-left:19px;float:left">
<h2>Changing ProgressBar value</h2>
<p>If we like change a ProgressBar Control value to 50% we simply use this code. The default ProgressBar.Maximum is 100 so a half from this is 50.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">ProgressBar1.Value = 50</pre></td></tr></table></div>

<h2>HTMLViewer page load progress</h2>
<p>More practical example for using ProgressBar Control is displaying a page load progress from HTMLViewer control. To do this go to code editor and in HTMLViewer Sub DocumentProgressChanged (URL As String, percentageComplete As Integer) enter:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">ProgressBar1.Value = percentageComplete</pre></td></tr></table></div>

<h2>Barber pole</h2>
<p>To display a barber pole set the maximum property to 0.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">ProgressBar1.Maximum = 0</pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-progressbar-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REALbasic – Timer Class</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-timer-class/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-timer-class/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 18:46:24 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[keydown events]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=119</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 119, userID 0, combination 1 -->
			
				
			
		
Timer Class is a object that can execute a code after a specified period of time or at a repeated interval. If added to a window via the Window Editor, it is not visible in the built application since it is not a control. Learn how can you use it!


What can we do with Timer [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 119, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-timer-class%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-timer-class%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Timer Class is a object that can execute a code after a specified period of time or at a repeated interval. If added to a window via the Window Editor, it is not visible in the built application since it is not a control. Learn how can you use it!</p>
<p><span id="more-119"></span></p>
<div style="margin-left:19px;float:left">
<h2>What can we do with Timer Class?</h2>
<p>The answer for this question is very easy &#8211; everything we like. For example we can use it for closing our application after 10 minutes from start, we can monitor some changes (keydown events, files changes), count time and speaking in one word one more time executing some code after a specified period of time (Period: 1000 = 1 second) .</p>
<h2>Shutdown application after 10 seconds</h2>
<p>Add to Window1 a Timer Class from Control Tab and set the Period Property to 10 000. Change also the Mode to 1- Single (this will start only once the Timer). Double click on Timer Control (Timer Sub Action()) and enter there:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">Quit</pre></td></tr></table></div>

<h2>Keydown events</h2>
<p>The following code in the Action event of a Timer detects whether the Up, Down, Left, or Right arrow keys are pressed and display you a info in StaticText1 Control.  Please remember to change the Mode Property to 2 &#8211; Multiple and the Period to for example 10.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">if</span> Keyboard.AsyncKeyDown(123) <span style="color: #000080;">then</span>
StaticText1.Text = <span style="color: #800000;">&quot;you have pressed left arrow key&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
<span style="color: #000080;">if</span> Keyboard.AsyncKeyDown(124) <span style="color: #000080;">then</span>
StaticText1.Text = <span style="color: #800000;">&quot;you have pressed right arrow key&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
<span style="color: #000080;">if</span> Keyboard.AsyncKeyDown(125) <span style="color: #000080;">then</span>
StaticText1.Text = <span style="color: #800000;">&quot;you have pressed down arrow key&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
<span style="color: #000080;">if</span> Keyboard.AsyncKeyDown(126) <span style="color: #000080;">then</span>
StaticText1.Text = <span style="color: #800000;">&quot;you have pressed up arrow key&quot;</span>
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span></pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-timer-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTMLViewer Control in REALbasic</title>
		<link>http://realbasic.tutspolis.com/classes/htmlviewer-control-in-realbasic/</link>
		<comments>http://realbasic.tutspolis.com/classes/htmlviewer-control-in-realbasic/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 19:02:47 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[htmlviewer]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[web browser]]></category>
		<category><![CDATA[webkit]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=90</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 90, userID 0, combination 1 -->
			
				
			
		
HTMLViewer available in REALbasic is a great control to render HTML files and web pages. It can be used for example for building a simple web browser, HTML editor or file browser. Learn how can you get the best from HTMLViewer Control!


HTMLViewer with WebKit engine on Linux
HTMLViewer use default libgtkhtml library to render HTML on [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 90, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Fhtmlviewer-control-in-realbasic%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Fhtmlviewer-control-in-realbasic%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>HTMLViewer available in REALbasic is a great control to render HTML files and web pages. It can be used for example for building a simple web browser, HTML editor or file browser. Learn how can you get the best from HTMLViewer Control!</p>
<p><span id="more-90"></span></p>
<div style="margin-left:19px;float:left">
<h2>HTMLViewer with WebKit engine on Linux</h2>
<p>HTMLViewer use default libgtkhtml library to render HTML on Linux&#8230; but there is a option to use WebKit. To do this simply install on your system libwebkit-1.0-1. If you like you can make a class that will install this library automatically.</p>
<h2>Creating one line browser in REALbasic</h2>
<p>To create a our web browser add to the Window HTMLViewer control. Set its LockLeft, LockTop, LockRight, and LockBottom properties so that it resizes as the user resizes the window. Now add a PushButton control and insert the code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">HTMLViewer1.LoadURL(http://tutspolis.com)</pre></td></tr></table></div>

<h2>Opening link in new Window</h2>
<p>If you like to have a option to open a link in new window add to HTMLViewer Function NewWindow() in code editor this code.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"> <span style="color: #000080;">Dim</span> w <span style="color: #000080;">as</span> <span style="color: #000080;">New</span> Window1 //name of Window where <span style="color: #000080;">is</span> our HTMLViewer <span style="color: #000080;">control</span>
&nbsp;
 Title = <span style="color: #800000;">&quot;new Window&quot;</span> //title <span style="color: #000080;">property</span> of <span style="color: #000080;">new</span> window
 w.Show //show the window
 Return w.HTMLViewer1 //render html</pre></td></tr></table></div>

<h2>Page load progress in ProgresBar control</h2>
<p>HTMLViewer can easy display the progress of page loading in ProgresBar control. You can make this using few lines of code in HTMLViewer Sub DocumentProgressChanged.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">if</span> percentageComplete = -1 <span style="color: #000080;">then</span> //<span style="color: #000080;">if</span> it cannot be determined
ProgressBar1.Maximum = 0 //display indeterminate progress
<span style="color: #000080;">else</span>
ProgressBar1.Maximum = 100
<span style="color: #000080;">end</span> <span style="color: #000080;">if</span>
ProgressBar1.Value = percentageComplete</pre></td></tr></table></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/htmlviewer-control-in-realbasic/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>REALbasic – TextArea Control</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-textarea-control/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-textarea-control/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 08:51:14 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[textarea]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=68</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 68, userID 0, combination 1 -->
			
				
			
		
TextArea control is a editable text area that you are using in text editors (notepad, word, openoffice, pages etc.) or IM. It can contain multiple lines of text and can display mixed fonts, font styles and sizes. Learn how can you use it!


Adding text to a TextArea
Add to the Window PushButton Control and double click [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 68, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-textarea-control%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-textarea-control%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>TextArea control is a editable text area that you are using in text editors (notepad, word, openoffice, pages etc.) or IM. It can contain multiple lines of text and can display mixed fonts, font styles and sizes. Learn how can you use it!</p>
<p><span id="more-68"></span></p>
<div style="margin-left:19px;float:left">
<h2>Adding text to a TextArea</h2>
<p>Add to the Window PushButton Control and double click on it. Then enter there the code below. It&#8217;s simply like in TextField.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">TextArea.Text = <span style="color: #800000;">&quot;REALbasic City sample text&quot;</span></pre></td></tr></table></div>

<h2>Reading text from a TextArea</h2>
<p>Reading the content from TextArea is extreme easy like this s = TextArea.Text. Here you got a example that shows Message Box:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> s <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
<span style="color: #000080;">Dim</span> d <span style="color: #000080;">as</span> <span style="color: #000080;">New</span> MessageDialog //<span style="color: #000080;">declare</span> the MessageDialog <span style="color: #000080;">object</span>
<span style="color: #000080;">Dim</span> b <span style="color: #000080;">as</span> MessageDialogButton //handling the result
&nbsp;
s = TextArea.Text
d.Message = s
b = d.ShowModal</pre></td></tr></table></div>

<h3>Changing selected text in TextArea</h3>
<p>Every text editor has a option to change the style of the text. Here you can look how you can simple change the selected text in TextArea control to new color and new font with bold style. Add the code to PushButton Sub Action()</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> Black <span style="color: #000080;">As</span> Color
&nbsp;
Black = RGB(0,0,0)
&nbsp;
TextArea.SelTextFont = <span style="color: #800000;">&quot;Arial&quot;</span>
TextArea.SelBold = <span style="color: #000080;">true</span>
TextArea.SelTextColor = Black</pre></td></tr></table></div>

<h2>Changing string with TextArea</h2>
<p>We can also change the text in string ex. by finding the word or by putting the cursor on indicated line. We will change the word &#8220;my&#8221; form text string by putting the cursor on 8 position and changing the next 2 letters to bold and red color.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> text <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
&nbsp;
text = <span style="color: #800000;">&quot;This is my string&quot;</span>
&nbsp;
TextArea.StyledText.Text = text
&nbsp;
TextArea.StyledText.Bold( 8, 2 ) = <span style="color: #000080;">true</span>
TextArea.StyledText.TextColor( 8, 2 ) = &amp;amp;cFF0020</pre></td></tr></table></div>

<h2>Using Mask</h2>
<p>Simply select TextArea in GUI builder Tab and then in Property and Value find Behavior -&gt; Mask and place there ex. ###-##-####. You can also add a code in TextArea Sub Open(). Go to Window1 code editor Controls -&gt; TextArea -&gt; Open.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">TextArea.Mask = <span style="color: #800000;">&quot;###-##-####&quot;</span> //US Social Security number
TextArea.Mask = <span style="color: #800000;">&quot;(###) ###-####&quot;</span> //US Phone number, <span style="color: #000080;">with</span> area code</pre></td></tr></table></div>

<h2>Mask Character in TextArea</h2>
<ul>
<b>#</b> &#8211; The single digit placeholder. Entry optional. If this position is left blank in the mask, it will be rendered as a space. Plus and minus signs are allowed. The user can type only a digit character in this position.<br />
<b>.</b> &#8211; Decimal placeholder. The decimal placeholder that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>,</b> &#8211; Thousands separator. The thousands separator that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>:</b> &#8211; Time separator. The time separator that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>/</b> &#8211; Date separator. The date separator that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>\</b> &#8211; Mask escape character. Treat the next character in the mask as a literal. The escape character enables you to use the &#8216;#&#8217;, &#8216;&amp;&#8217;, &#8216;A&#8217;, &#8216;?&#8217; (and so on) characters in the mask. The escapted character is treated as a literal (formatting) character.<br />
<b>&amp;</b> Character or space placeholder. Valid values are the ASCII characters 32-126 and the non-ASCII characters 128-255.<br />
<b>C</b> &#8211; Character or space placeholder, where entry is optional. It operates like the &#8216;&amp;&#8217; placeholder.<br />
<b>&gt;</b> &#8211; Convert all the characters that follow to uppercase. Uppercasing works beyond the ASCII range where appropriate, e.g., ü becomes Ü.<br />
<b>&lt;</b> &#8211; Convert all the characters that follow to lowercase. Lowercasing works beyond the ASCII range where appropriate, e.g., Ü becomes ü.<br />
<b>A</b> &#8211; Alphanumeric character placeholder, where entry is mandatory.<br />
For example, the spec &#8220;AAA&#8221; specifies three alphanumeric characters.<br />
<b>a</b> -Alphanumeric character placeholder, where entry is optional.<br />
<b>0</b> &#8211; Any single digit between 0 and 9. Entry is required.<br />
<b>9</b> &#8211; Digit or space where entry is optional.<br />
<b>?</b> &#8211; Alphabetic placeholder. Entry is optional.<br />
<b>L</b> &#8211; Alphabetic placeholder. Entry is required. Any literal. All other symbols are displayed as literals for formatting purposes.<br />
<b>~</b> &#8211; Reserved for future use. If you use &#8220;~&#8221; it will trigger an exception error. Use \~ instead.
</ul>
<h2>Using TextArea Property and Value</h2>
<p>When you select TextArea in GUI builder you can change some Property and Value for this control. We have got there position properties (width, height), appearance (text color, border), font (text size, text font), initial state (default text), behaviors (mask, read only) or database binding. Please play with them for a wile to understand what is happening when you change the values.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-textarea-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REALbasic – TextField Control</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-textfield-control/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-textfield-control/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 13:28:30 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[textfield]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=64</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 64, userID 0, combination 1 -->
			
				
			
		
TextField control is a standard editable text field that you are using in fast every available application (browsers, preference panels, IM&#8217;s, e-mail clients etc.). It can contain only one line of text, with one font, font size and style. Learn how can you use it!


Adding text to a TextField
For example add to the Window PushButton [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 64, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-textfield-control%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-textfield-control%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>TextField control is a standard editable text field that you are using in fast every available application (browsers, preference panels, IM&#8217;s, e-mail clients etc.). It can contain only one line of text, with one font, font size and style. Learn how can you use it!</p>
<p><span id="more-64"></span></p>
<div style="margin-left:19px;float:left">
<h2>Adding text to a TextField</h2>
<p>For example add to the Window PushButton Control and double click on it  (at a glance PushButton Sub Action()). Then enter there the code below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">TextField.Text = <span style="color: #800000;">&quot;REALbasic City sample text&quot;</span></pre></td></tr></table></div>

<h2>Reading text from a TextField</h2>
<p>Reading the content from TextField is extreme easy like this s = TextField1.Text. Here you got a example that shows Message Box:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Dim</span> s <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
<span style="color: #000080;">Dim</span> d <span style="color: #000080;">as</span> <span style="color: #000080;">New</span> MessageDialog //<span style="color: #000080;">declare</span> the MessageDialog <span style="color: #000080;">object</span>
<span style="color: #000080;">Dim</span> b <span style="color: #000080;">as</span> MessageDialogButton //handling the result
&nbsp;
s = TextField1.Text
d.Message=s
b=d.ShowModal</pre></td></tr></table></div>

<h3>Using Mask</h3>
<p>Simply select TextField in GUI builder Tab and then in Property and Value find Behavior -&gt; Mask and place there ex. ###-##-####. You can also add a code in TextField Sub Open(). Go to Window1 code editor Controls -&gt; TextField -&gt; Open.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="vb" style="font-family:monospace;">TextField.Mask = <span style="color: #800000;">&quot;###-##-####&quot;</span> //US Social Security number
TextField.Mask = <span style="color: #800000;">&quot;(###) ###-####&quot;</span> //US Phone number, <span style="color: #000080;">with</span> area code</pre></td></tr></table></div>

<h2>Mask Character in TextField</h2>
<ul>
<b>#</b> &#8211; The single digit placeholder. Entry optional. If this position is left blank in the mask, it will be rendered as a space. Plus and minus signs are allowed. The user can type only a digit character in this position.<br />
<b>.</b> &#8211; Decimal placeholder. The decimal placeholder that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>,</b> &#8211; Thousands separator. The thousands separator that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>:</b> &#8211; Time separator. The time separator that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>/</b> &#8211; Date separator. The date separator that is actually used is specified in the user&#8217;s International settings. The character is treated as a literal (formatting) character for masking purposes.<br />
<b>\</b> &#8211; Mask escape character. Treat the next character in the mask as a literal. The escape character enables you to use the &#8216;#&#8217;, &#8216;&amp;&#8217;, &#8216;A&#8217;, &#8216;?&#8217; (and so on) characters in the mask. The escapted character is treated as a literal (formatting) character.<br />
<b>&amp;</b> Character or space placeholder. Valid values are the ASCII characters 32-126 and the non-ASCII characters 128-255.<br />
<b>C</b> &#8211; Character or space placeholder, where entry is optional. It operates like the &#8216;&amp;&#8217; placeholder.<br />
<b>&gt;</b> &#8211; Convert all the characters that follow to uppercase. Uppercasing works beyond the ASCII range where appropriate, e.g., ü becomes Ü.<br />
<b>&lt;</b> &#8211; Convert all the characters that follow to lowercase. Lowercasing works beyond the ASCII range where appropriate, e.g., Ü becomes ü.<br />
<b>A</b> &#8211; Alphanumeric character placeholder, where entry is mandatory.<br />
For example, the spec &#8220;AAA&#8221; specifies three alphanumeric characters.<br />
<b>a</b> -Alphanumeric character placeholder, where entry is optional.<br />
<b>0</b> &#8211; Any single digit between 0 and 9. Entry is required.<br />
<b>9</b> &#8211; Digit or space where entry is optional.<br />
<b>?</b> &#8211; Alphabetic placeholder. Entry is optional.<br />
<b>L</b> &#8211; Alphabetic placeholder. Entry is required. Any literal. All other symbols are displayed as literals for formatting purposes.<br />
<b>~</b> &#8211; Reserved for future use. If you use &#8220;~&#8221; it will trigger an exception error. Use \~ instead.
</ul>
<h2>Using TextField Property and Value</h2>
<p>When you select TextField in GUI builder you can change some Property and Value for this control. We have got there position properties (width, height), appearance (text color, border), font (text size, text font), initial state (default text), behaviors (mask, read only) or database binding. Please play with them for a wile to understand what is happening when you change the values.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-textfield-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REALbasic Classes from Alex Restrepo</title>
		<link>http://realbasic.tutspolis.com/classes/realbasic-classes-from-alex-restrepo/</link>
		<comments>http://realbasic.tutspolis.com/classes/realbasic-classes-from-alex-restrepo/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:38:24 +0000</pubDate>
		<dc:creator>Jakub Pawlak</dc:creator>
				<category><![CDATA[Classes & Controls]]></category>
		<category><![CDATA[Alex Restrepo]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[realbasic]]></category>

		<guid isPermaLink="false">http://realbasic.tutspolis.com/?p=58</guid>
		<description><![CDATA[<!-- isPostPurchased ,postID 58, userID 0, combination 1 -->
			
				
			
		
At Alex Restrepo ..Nowhere.. site we can find some amazing, freeware classes for REALbasic. Alex is also a author of two applications &#8211; Leecher (download all  specified files&#8230;) and Prismas (simulates a ray of light passing through different prisms).


List of Alex Restrepo classes

Custom EditField &#8211; A highly customizable, 100% REALBasic Canvas-based EditField.
Alternating ListBox &#8211; [...]]]></description>
			<content:encoded><![CDATA[<!-- isPostPurchased ,postID 58, userID 0, combination 1 --><div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-classes-from-alex-restrepo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Frealbasic.tutspolis.com%2Fclasses%2Frealbasic-classes-from-alex-restrepo%2F&amp;source=REALbasicCity&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>At Alex Restrepo ..Nowhere.. site we can find some amazing, freeware classes for REALbasic. Alex is also a author of two applications &#8211; Leecher (download all  specified files&#8230;) and Prismas (simulates a ray of light passing through different prisms).</p>
<p><span id="more-58"></span></p>
<div style="margin-left:19px;float:left">
<h2>List of Alex Restrepo classes</h2>
<ul>
<b>Custom EditField</b> &#8211; A highly customizable, 100% REALBasic Canvas-based EditField.<br />
<b>Alternating ListBox</b> &#8211; A listbox that alternates the colors of the rows.<br />
<b>Convolutions</b> &#8211; The application will apply a 3&#215;3 convolution kernel to an image and display the results, very slow and unoptimized.<br />
<b>Custom Cells</b> &#8211; A listbox with custom cells allows you to have buttons, progressbars and just about anything you want inside a listbox cell.<br />
<b>Custom Frames</b> &#8211; This is a little experiment, and an old one as well, where I was building little &#8220;windows&#8221; within a canvas to display different types of information.<br />
<b>Custom TabPanel</b> &#8211; A Canvas-based tab panel that mimics the tabpanel in the RealBasic IDE (even with animations!).<br />
<b>Custom Toolbar</b> &#8211; An OSX-style toolbar, useful when you want to have a consistent toolbar in your cross-platform applications, it has some of the features available in OSX native toolbars like button reordering, although given the buffered nature of OSX the reordering animation looks a lot better in Windows.<br />
<b>DatabaseUpdate</b> &#8211; A simple class to build &#8220;Update&#8221; sql statements, handling the formating for you.<br />
<b>Dir View</b> &#8211; A listbox subclass that will display hierarchically the contents of a directory.<br />
<b>ExcelWritter</b> &#8211; A listbox extension that saves the contents of the listbox as an excel file, by calling listbox.saveAsExcelFile(folderItem).<br />
<b>GraphCanvas</b> &#8211; A canvas that will draw an x,y line graph of one or multiple &#8220;datasets&#8221;, you can modify almost every aspect of the resulting graph. Look at the included demo for an example.<br />
<b>Grid Canvas</b> &#8211; A canvas with a variable-size grid, each cell gets its own CellClick and CellPaint events. It can be used for a game map editor, but you may find it useful for something else.<br />
<b>Indeterminate Animation</b> &#8211; A canvas that will display a series of pictures (stored as a single picture, one frame on top of the next) as a looping animation.<br />
<b>Inspector</b> &#8211; A floating window that mimics the RealBasic properties window, allows you to see (and edit) the contents of a dictionary, there&#8217;s also an interface that you can implement to &#8220;inspect&#8221; your classes.<br />
<b>Library Listbox</b> &#8211; A custom listbox that mimics the appearance of the &#8220;library&#8221; listboxes found in applications such as iTunes.<br />
<b>Listbox Printer</b> &#8211; A simple class that will print the contents of a listbox.<br />
<b>Picture Viewer</b> &#8211; A ContainerControl that displays a picture. The user can change the scaling of the picture, or fit the picture to the actual control size. Click and drag in order to scroll the picture is also available.<br />
<b>PreviewCanvas(iPhotostyle)</b> &#8211; This canvas allows you to display previews of any object that implements the included &#8220;PreviewableObject&#8221; interface, the previews can be then scaled and selected.<br />
<b>Reflection Canvas</b> &#8211; This canvas displays an image and then mirrors and fades the image horizontally, resulting in an interesting effect, like the video snapshots you see in iTunes.<br />
<b>Round Slider</b> &#8211; A slider replacement, with a round knob. You can use any of 3 different sizes: normal, small and tiny, has a transparent background and fires MouseUp events, it also has an AllowCancel property, to return the slider to its original value when the MouseUp event was fired outside the slider.<br />
<b>Selection Canvas</b> &#8211; When the canvas is set to accept clicks, it will create a closed selection specified by the mouse clicks, you can then move, delete or add &#8220;Control Points&#8221;.<br />
<b>SyntaxHighlightEditField</b> &#8211; An expandable, multiple-language Syntax Highlighter EditField. You can easily define Highlight Definitions for different languages, included in the download are the definitions for C, Java, Objective-C, RealBasic and XML.<br />
<b>Telnet Socket</b> &#8211; simple Telnet support for REALbasic<br />
<b>TreeView</b> &#8211; A TreeLike structure and a ListBox capable of displaying it, including lines between parent and child nodes.</p>
<h3>More information</h3>
<p><a href="http://homepage.mac.com/alexrestrepo/indexmain.html">..Nowhere.. Alex Restrepo</a>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://realbasic.tutspolis.com/classes/realbasic-classes-from-alex-restrepo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
