KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

RichTextBox.html not working correctly?

 
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting
View previous topic :: View next topic  
Author Message
Samuel Blaettler
KiXforms Novice
KiXforms Novice


Joined: 16 Mar 2006
Posts: 4

PostPosted: Tue Feb 19, 2013 1:54 pm    Post subject: RichTextBox.html not working correctly? Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group