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 vs Text vs Text that is HTML
Goto page Previous  1, 2
 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Mar 30, 2004 8:39 am    Post subject: Reply with quote

On Cool
_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Stevie
KiXforms Supporter
KiXforms Supporter


Joined: 04 Jun 2003
Posts: 109

PostPosted: Tue Apr 13, 2004 6:32 pm    Post subject: Reply with quote

Are you planning on including both a .text property and an .rtf property? One for the actual text and the other for ALL the data--both text and all richtext control codes?
________
Oregon Medical Marijuana Dispensaries


Last edited by Stevie on Fri Feb 18, 2011 8:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Apr 13, 2004 7:58 pm    Post subject: Reply with quote

Well, let me tell you little story about where I'm at right now. Because of technical difficulties (basically it was confusing the hell out of me), the idea to have TEXT and HTML arriving on a single stream was NOT working out, even with the flag we discussed before ... so here's where its at now:

Text Property

Behaves exactly like the .NET RTB Text property - @CRLF's are interpreted as line breaks (this was what was causing the above mentioned "difficulty" - trying to sort-out hard @CRLF's from soft, fuzzy, non-existent HTML ones, amongst other things)

RTF Property

Behaves exactly like .NET RTB RTF property

HTML Property

This is ours (KF's) and there is no .NET equiv (afaik). Anything coming in on this "stream" is treated as pure HTML ...

LoadFile/SaveFile Method

Got the LoadFile and SaveFile methods pumping TEXT/RTF now as well, haven't made-up my mind on pumping HTML with them yet.

But anyway, think you may agree that this three stream (property) idea is sweet and simple ...

-Shawn
Back to top
View user's profile Send private message
Sealeopard
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 436
Location: Boston, MA

PostPosted: Tue Apr 13, 2004 8:24 pm    Post subject: Reply with quote

Now, if I put something into the HTML property, will the TEXT and RTF properties contain the same, just in their respective formats?
_________________
Jens

'There are two kinds of vessels, submarines and targets.'
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Apr 13, 2004 8:35 pm    Post subject: Reply with quote

You got it, if you put something into the HTML property, the Text property will contain the simple text version of the rendered HTML and the RTF property will contain the RTF version of the rendered HTML (note I said rendered)

But ... if you put something INTO the Text or Rtf properties, you can't pull the HTML version of it from the HTML property ... the HTML property is just a container for whatever document is currently being rendered as HTML, will return blank otherwise (haven't coded that part yet though).

Basically the HTML converter only goes one-way.
Back to top
View user's profile Send private message
Sealeopard
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 436
Location: Boston, MA

PostPosted: Tue Apr 13, 2004 8:48 pm    Post subject: Reply with quote

And SaveFile offers me to save either of the three properties?
_________________
Jens

'There are two kinds of vessels, submarines and targets.'
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Stevie
KiXforms Supporter
KiXforms Supporter


Joined: 04 Jun 2003
Posts: 109

PostPosted: Tue Apr 13, 2004 9:21 pm    Post subject: Reply with quote

So you're internally converting html to rtf, right? And by extension, you should be able to load from any three types, but only save text and rtf. Am I following you?

The biggest issue with loading html is that you're not writing an entire html parser for the rtf control, so people will probably try to load whole web page with client script, etc. and wonder why it's not working.

Which brings up a great point that I'm sure has been made before, but I can't remember seeing it offhand. How about a web browser control? Don't need full DOM access to the html but just something that can display any web page and/or navigate to one.
________
HAWAII MARIJUANA DISPENSARIES


Last edited by Stevie on Fri Feb 18, 2011 8:52 am; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Apr 13, 2004 10:16 pm    Post subject: Reply with quote

you got it exactly, internally converting to RTF and can only save as Text or RTF.

WebBrowser control, funny you should mention that because Chris and I were briefy discussing this the other day on MSN. I've worked with the WebBrowser control before, in fact - you may remeber a Kixtart util called KIXPOP ? That was simply a form wrapping the web browser control, with a very simple cmdline interface to the DOM.

Supporting the web browser as a control in KF would be somewhat trivial, depending on how far it was taken, the control (the window) could have all the thingies like Left, Top, Width etc, etc ... then we could "expose" the DOM through a Document property, then from there one would be talking straight to IE and not KF.

What would be cool though, and I have given it some thought, is to be able to "hook" DOM events into KF events !!! Given that Kixtart doesn't support ActiveX events, could potentially have KF sink the events instead, and funnel them through DoEvents ...

Much possibility there but tbh, I like the RTB HTML because its a) simple and b) light-weight ... lightweight being a key factor because that Web Browser can be (afaik) a bit of pig on resources.
Back to top
View user's profile Send private message
Sealeopard
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 436
Location: Boston, MA

PostPosted: Tue Apr 13, 2004 10:26 pm    Post subject: Reply with quote

Maybe a separate browser DLL that KiXforms can use if present. And how about KiXforms somehow supporting calls to native
DLL functions ?

_________________
Jens

'There are two kinds of vessels, submarines and targets.'
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Apr 13, 2004 10:45 pm    Post subject: Reply with quote

A light-wrapping of the web-browser control would add next to zero KF bloat (afaik), so theres no reason (imho) not to add the WebBrowser with an exposed Document property.

The non-GUI stuff, to my mind, has less priority because this is basically a forms package. The only thing I would like to "branch out" into is the Process and ProcessStartInfo objects, only because they relate to running stuff in GUI mode (ie, running an exe and refreshing the form/reponding to events) at the same time kinda thing.
Back to top
View user's profile Send private message
Stevie
KiXforms Supporter
KiXforms Supporter


Joined: 04 Jun 2003
Posts: 109

PostPosted: Tue Apr 13, 2004 11:22 pm    Post subject: Reply with quote

We be happy Very Happy
________
Mac game


Last edited by Stevie on Fri Feb 18, 2011 8:52 am; edited 1 time in total
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Wed Apr 14, 2004 2:29 am    Post subject: Reply with quote

Well, I have recieved more requests for web browser type functions than RTF. They usually want me to essentially rewrite some page and I would rather just host it inside a form.
_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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