Samuel Blaettler KiXforms Novice

Joined: 16 Mar 2006 Posts: 4
|
Posted: Tue Feb 19, 2013 1:54 pm Post subject: RichTextBox.html not working correctly? |
|
|
I'm currently working on a small script that uses Kixforms to present the gui. I use a RichtTextBox object to be able to do some formatting of the text (bold, line breaks).
I am able to load html code into the object via RichTextBox.html, but when I add some additional text, RichTextBox.html doesn't return the actual content of the RichtTextBox, but RichTextBox.text shows the correct text. Is this an error or am I missing something?
Code: |
Break On
Dim $Ret, $System, $TestForm, $cmd
$Ret = SetOption("explicit", "on")
$TestForm = CreateObject("Kixtart.Form")
If @ERROR
$cmd = 'msiexec /i "' + @SCRIPTDIR + '\KiXforms.msi" /qb /norestart'
Shell $Cmd
EndIf
$System = CreateObject("KiXtart.System")
Dim $Form1
$Form1 = $System.Form()
$Form1.Text = "Test"
Dim $RichTextBox1
$RichTextBox1 = $Form1.Controls.RichTextBox()
$RichTextBox1.Location = 13, 13
$RichTextBox1.Size = 259, 195
Dim $Button1
$Button1 = $Form1.Controls.Button()
$Button1.Text = "Done"
$Button1.Size = 75, 23
$Button1.Location = 96, 227
$Button1.OnClick = "onDone($$Form1, $$RichTextBox1)"
$RichTextBox1.html = "This is an example test. <Br><Br><Br>Text you add here is not shown via .html, but via .text, try it!<p> An example of <b>BoldText</b></p>"
Dim $Null
$Form1.Show
While $Form1.Visible
$Null=Execute($System.Application.DoEvents)
Loop
Function onDone($Form1, $RichTextBox1)
Dim $Ret
$Ret = MessageBox($RichTextBox1.html, "HTML code is", 16)
$Ret = MessageBox($RichTextBox1.text, "Text code is", 16)
$Form1.visible = false
EndFunction
|
|
|