View previous topic :: View next topic |
Author |
Message |
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Tue Apr 26, 2005 10:00 am Post subject: Pls provide more extensive sample code for RichTextBox |
|
|
Thanks for providing the RichTextBox as part of the latest release of Dfl.
I would appreciate a more elaborate example of using this control. I suppose I am being lazy and should figure it out myself, but you are the expert and there is something to be said for having source code showing the correct way of doing things.<g>
Can your RichTextBox do the following? (and, if so, please provide an example)
Superscript, letters in black, letters in red, italics, multiline, bold, bold inside of italic, and selection highlighting. Such as.
Superscript goes here Then the developers said,"DFL is wonderful" and proceeded to astonish the world with the app they developed.
Also, I will doing Search within text, and want to highlight the found text. If you have the time, can your example also show the capability of highlighting perhaps the 10th thru 30th letters ... which spans the different font sizes.
Thanks very much. Your DFL library was the last thing I was waiting on to proceed with an application. Full speed ahead <g> |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Tue Apr 26, 2005 12:04 pm Post subject: Re: Pls provide more extensive sample code for RichTextBox |
|
|
Lynn wrote: | Can your RichTextBox do the following? (and, if so, please provide an example)
Superscript, letters in black, letters in red, italics, multiline, bold, bold inside of italic, and selection highlighting. Such as.
Superscript goes here Then the developers said,"DFL is wonderful" and proceeded to astonish the world with the app they developed.
Also, I will doing Search within text, and want to highlight the found text. If you have the time, can your example also show the capability of highlighting perhaps the 10th thru 30th letters ... which spans the different font sizes. |
Try this, http://www.vathix.com/d/dfl/charformat.html - temporary location because dprogramming.com apparently expired even though I had auto-renew enabled. I renewed it and see that auto-renew is in fact enabled, oh well; it'll take a day or so to propagate DNS info.
RichTextBox does not yet support subscript/superscript, but I've added it to my todo list.
- Chris |
|
Back to top |
|
|
Lynn
Joined: 27 Aug 2004 Posts: 89
|
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Tue Apr 26, 2005 4:53 pm Post subject: Re: Pls provide more extensive sample code for RichTextBox |
|
|
Wow, that's cool! I was thinking of something like...
Code: | {\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang1033
{\\fonttbl{\\f0\\froman\\fprq2\\fcharset0 Times New Roman;}
{\\f1\\froman\\fprq2\\fcharset0 Garamond;}{\\f2\\fswiss\\fprq2\\fcharset0 Verdana;}}
{\\colortbl ;\\red255\\green255\\blue0;\\red0\\green0\\blue0;\\red0\\green255\\blue255;
\\red128\\green128\\blue128;\\red255\\green0\\blue0;\\red0\\green255\\blue0;\\red0\\green0\\blue255;
\\red255\\green255\\blue255;}
\\viewkind4\\uc1\\pard\\qc\\cf1\\b\\i\\f0\\fs72 Win32 GUI\\cf2\\f1\\par
\\cf8\\fs20 Sample Application
\\par\\cf3\\fs36 D Win32 Application based on\\par BCX Built-in GUI Functions\\cf4\\i0\\f2
\\par\\cf5\\ul\\b0 D\\cf6 E\\cf7 M\\cf1 O\\cf4\\ulnone
\\par\\par\\cf8\\fs20 Ported to D by jcc7\\par\\cf8\\fs20 April 26, 2005
\\par\\par\\cf8\\fs20 My D page:\\par\\cf8\\fs20 http://jcc_7.tripod.com/d/\\cf4\\par} | but you method looks a lot better. |
|
Back to top |
|
|
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Tue Apr 26, 2005 6:28 pm Post subject: |
|
|
Quote: | because dprogramming.com apparently expired even though I had auto-renew enabled. I renewed it and see that auto-renew is in fact enabled, oh well; it'll take a day or so to propagate DNS info. |
Something to consider. I've found it quite easy to get a SourceForge project approved. They provide quite suitable webhosting for free for approved projects. I think their reliability was so-so years ago, but seems to have improved.
Who do you use for web-hosting? I've had good experience with www.godaddy.com for actually registering ($8.95/yr) a domain and simple webhosting for $3.95/month. You can register a domain name and have it point to the sourceforge hosting to avoid paying for webhosting.
HTH |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sun May 22, 2005 6:26 am Post subject: |
|
|
Sorry, somehow I didn't see those last 2 messages until now.
Today's snapshot supports subscript and superscript, http://www.dprogramming.com/dfl/snapshots/ - see the charformat example, also available at http://www.dprogramming.com/dfl/charformat.html .
Lynn wrote: | Who do you use for web-hosting? I've had good experience with www.godaddy.com for actually registering ($8.95/yr) a domain and simple webhosting for $3.95/month. You can register a domain name and have it point to the sourceforge hosting to avoid paying for webhosting. |
Was using 1and1, $30 for 6 months; but recently got a VPS that gives me a lot of control. The domain expiring was just an accident.
- Chris |
|
Back to top |
|
|
Lynn
Joined: 27 Aug 2004 Posts: 89
|
Posted: Sun May 22, 2005 6:54 am Post subject: |
|
|
Wow! ... Tabs ... I'll give them a try.
And thanks also for the Rtf superscript! |
|
Back to top |
|
|
mitja
Joined: 18 Feb 2005 Posts: 19
|
Posted: Mon Aug 29, 2005 3:45 am Post subject: |
|
|
Hi!
Could you please explain how to align text which is in at least 2 columns?
I used the code for aligning I had for console version of the app, but unlike in console, where fonts are differently displayed, this code doesn't work too well.
I would like to have the data in the second column aligned under the first datum (Dan Brown). So it would look more like a table.
How do I achieve this?
|
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Mon Aug 29, 2005 7:03 am Post subject: |
|
|
mitja wrote: | Hi!
Could you please explain how to align text which is in at least 2 columns?
I used the code for aligning I had for console version of the app, but unlike in console, where fonts are differently displayed, this code doesn't work too well.
I would like to have the data in the second column aligned under the first datum (Dan Brown). So it would look more like a table.
How do I achieve this?
|
Using the Win32 API this is how I'd do it ...
Two quick methods are to use fixed width fonts, but often that doesn't look so pretty, and the other is to define your own tabstop locations and use tabs.
To set tabstops, you need to create and initialize a PARAFORMAT struct with the PFM_TABSTOPS mask, set the cTabCount to 1 and store the absolute tabstop position (in 1000ths of inches) in the rgxTabs array. Finally send the EM_SETPARAFORMAT message with lParam containing the address of the PARAFORMAT struct. Clean up after yourself and then inserts tabs into the data stream to create the effect of a 2-column table. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
|
Back to top |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|