Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

HtmlPanel - rich text on the device

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2009, 04:09 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default HtmlPanel - rich text on the device

It has long been a problem that a RichTextBox has not been available on devices so that producing coloured and formatted text has been a problem. The only work around for Basic4ppc has been to use a WebBrowser but that is not always ideal.

I have looked around many times but have not found a non-commercial solution but at long last I have stumbled upon some code written in the early days of .NET 1.0 that is worth building upon.

This is very much an initial taster version. I have a lot more work to do to expose more functionality but note that you should be able to assign a ContextMenu to it so overcoming one of the WebBrowser shortcomings. Suggestions for improvement are welcome.

No manual yet but demo included. It should work on .NET 1.0 and later on both device and desktop.

EDIT: Improved version 0.2 posted.

EDIT: Version 1.0 posted with help and demo. See post #13.

EDIT: Version 1.1 posted. See post #16.

EDIT: Version 1.2 posted. See post #20.

EDIT: Version 1.3 posted. See post #21.

EDIT: Version 1.4 posted. This version is AutoScale aware. See post #30.

EDIT: Version 1.5 posted. See post #48.
Attached Files
File Type: zip HtmlPanel1.5.zip (55.9 KB, 282 views)

Last edited by agraham : 08-21-2009 at 01:46 PM.
Reply With Quote
  #2 (permalink)  
Old 03-03-2009, 06:56 AM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

wow!big thanks agraham!it is very good!
but maybe it's real with this control-
1)selecting text(and params selectStart and select Length)
2)scroll this control for comand(for example pageup,pagedown)
3)place event mouseup/down/move to this control
4)know position of scrollbar
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #3 (permalink)  
Old 03-04-2009, 08:33 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Byak@ View Post
selecting text(and params selectStart and select Length)
It isn't possible to select text using the mouse. The demo shows that you can detect the block of text that was clicked but that's as close as you will get to selecting text.
Quote:
scroll this control for comand(for example pageup,pagedown)
The scrollbar LargeChange properties give you the value in pixels for a page distance.
Quote:
place event mouseup/down/move to this control
Mouse and ScrollBar events added.
Quote:
know position of scrollbar
Get and set ScrollBar values added together with Max value which is the length in pixels of the rendered bitmap
Reply With Quote
  #4 (permalink)  
Old 03-04-2009, 02:27 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

thanks agraham)but maybe it is real to add selecting text? or another way for it?
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #5 (permalink)  
Old 03-04-2009, 02:34 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Byak@ View Post
real
I think it's about time we sorted out what you mean by "is it real" as you use it a lot but I don't know really what you mean Do you mean "is it possible" or "does it exist"?
Reply With Quote
  #6 (permalink)  
Old 03-04-2009, 08:35 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

in this case "does it exist" =)
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #7 (permalink)  
Old 03-05-2009, 11:06 AM
Basic4ppc Expert
 
Join Date: May 2008
Location: Italy
Posts: 599
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Graham,

Great stuff by you as usual. You're my hero ! I will look forward to following the progress of this control.

I read somewhere that a few years (versions back) ago, Microsoft actually released a RichTextBox for Windows Mobile in a beta-release of VS (or CF.NET) but it was later abandoned.

rgds,
moster67
Reply With Quote
  #8 (permalink)  
Old 03-07-2009, 10:06 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

It might just be me, but I think there is a problem at display. There is a ~13 pixels wide space (scrollbar space?) where no text is displayed. This means there is sometimes a missing letter at the end of the panel.
__________________
Reply With Quote
  #9 (permalink)  
Old 03-08-2009, 09:14 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

It is the scrollbar space but that's not why you are missing characters. It is presently riddled with obscure bugs, hence the 0.x versioning and lack of help. I'm wringing them out at the moment. Next version in a day or so.
Reply With Quote
  #10 (permalink)  
Old 03-08-2009, 11:45 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

Quote:
Originally Posted by agraham View Post
It is the scrollbar space but that's not why you are missing characters. It is presently riddled with obscure bugs, hence the 0.x versioning and lack of help. I'm wringing them out at the moment. Next version in a day or so.
Great! Looking forward to include it in Gecko ^_^
__________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering text in a text box or label joel2009 Questions (Windows Mobile) 4 02-25-2009 02:53 PM
Text an einen bereits bestehenden Text "anhängen" JOTHA German Forum 7 09-12-2008 01:08 PM
Label/Text Control text centering TWELVE Basic4ppc Wishlist 1 06-04-2008 03:20 PM


All times are GMT. The time now is 06:46 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0