By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,679 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,679 IT Pros & Developers. It's quick & easy.

Lebans RTF2 control -- bug with non-Western text?

P: n/a
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what
may be a slight bug in it.

I have a lot of non-Western language (Chinese) text in my RTF field, and
such records get sized strangely using the .RTFHeight property of the
control. Specifically, lines of text get cut off the bottom of the control
when I use the code provided in the sample report on the lebans.com site. It
seems that when there is Chinese text, whose line height is a bit higher
than English codepage text, it misestimates the height.

Anyone else seen such an issue -- or, if Stephen is in the NG, any chance of
fixing it in a future release? Is it possible it's a bug in the underlying
Richedit control from MS?

Thanks,

Bruce Rusk
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Stephen,

Thanks for your reply. I did a quick check and haven't found any such bug,
but I'm not sure what property of the RTF control you're using in RTF2: the
RichTextBox control does not appear to have an .RTFHeight property, or
anything similar. If you let me know what properties your control is
referencing, I can check into it.

Also, I posted something a few days ago, I'm not sure if you saw it, asking
what the best way is to set a default value for a Memo field which will be
used by the RTF2 control on a form: by setting a text value in the field, on
the control, or with code. Any suggestions?

Thanks,

Bruce Rusk
"Stephen Lebans" <St***********@mvps.org> wrote in message
news:PU******************@ursa-nb00s0.nbnet.nb.ca...
The prop I expose for determining the height of the control is
calculated and returned by the RTF control, not me. This would be a
Microsoft issue over which I have not control that I know of. Have you
searched on the MS KB and GoogleGroups to see if others have run into
this issue(they must have). If you find a fix let me know and I will
incorporate it into the next release.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu...
I'm using Stephen Lebans' RTF2 control in a report, and have

discovered what
may be a slight bug in it.

I have a lot of non-Western language (Chinese) text in my RTF field,

and
such records get sized strangely using the .RTFHeight property of the
control. Specifically, lines of text get cut off the bottom of the

control
when I use the code provided in the sample report on the lebans.com

site. It
seems that when there is Chinese text, whose line height is a bit

higher
than English codepage text, it misestimates the height.

Anyone else seen such an issue -- or, if Stephen is in the NG, any

chance of
fixing it in a future release? Is it possible it's a bug in the

underlying
Richedit control from MS?

Thanks,

Bruce Rusk

Nov 12 '05 #2

P: n/a
Hi Bruce,
first, or second in this case, I did post a reply back to your inquiry
on default settings for my control. I copied it below this message.

I'm not quite sure what you are talking about here in refererence to my
RTF control and its Height method(RTFheight). DO you mean the MS RTF
control when you state it does not have a Height prop? I know it
doesn't. Perhaps you do not understand that my control is not the MS RTF
control nor a wrapper for it. It is instantiated from the RTF DLL
directly.
When you are searching the MS KB or Google you will have to look in the
C++ related material to find developers who are querying the control
directly to ascertain the requried control height to completely display
its contents. Serach for the control message EM_REQUESTRESIZE.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu...
Stephen,

Thanks for your reply. I did a quick check and haven't found any such bug, but I'm not sure what property of the RTF control you're using in RTF2: the RichTextBox control does not appear to have an .RTFHeight property, or
anything similar. If you let me know what properties your control is
referencing, I can check into it.

Also, I posted something a few days ago, I'm not sure if you saw it, asking what the best way is to set a default value for a Memo field which will be used by the RTF2 control on a form: by setting a text value in the field, on the control, or with code. Any suggestions?

Thanks,

Bruce Rusk
"Stephen Lebans" <St***********@mvps.org> wrote in message
news:PU******************@ursa-nb00s0.nbnet.nb.ca...
The prop I expose for determining the height of the control is
calculated and returned by the RTF control, not me. This would be a
Microsoft issue over which I have not control that I know of. Have you searched on the MS KB and GoogleGroups to see if others have run into this issue(they must have). If you find a fix let me know and I will
incorporate it into the next release.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu...
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what
may be a slight bug in it.

I have a lot of non-Western language (Chinese) text in my RTF field,
and
such records get sized strangely using the .RTFHeight property of
the control. Specifically, lines of text get cut off the bottom of the

control
when I use the code provided in the sample report on the

lebans.com site. It
seems that when there is Chinese text, whose line height is a bit

higher
than English codepage text, it misestimates the height.

Anyone else seen such an issue -- or, if Stephen is in the NG, any

chance of
fixing it in a future release? Is it possible it's a bug in the

underlying
Richedit control from MS?

Thanks,

Bruce Rusk


From: "Stephen Lebans" <St***********@mvps.org>
Newsgroups: comp.databases.ms-access
References: <bj**********@gladiola.noc.ucla.edu>
Subject: Re: Default values for Stephen Lebans' RTF2 control
Date: Wed, 3 Sep 2003 22:25:08 -0300
Lines: 66
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

I'm having trouble with persisting multiple properties with this
control. The documentation is straightforward but only seems to work for
single props. I returned from summer vacation yesterday and will get
back to programming soon.

In the mean time you may consider another solution.
1) WIth a new or blank record setup the fonts/etc they way you want
without entering any text. Save this record
2) Save the contents of this record to a table/custom prop/whatever.
3) Whenever a new record is inserted copy the contents of the previously
saved "setup data" to this record.

I've hand a major update to the control sitting on my computer all
summer but never got around to posting it...coming soon!

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu... I've just started using Stephen Lebans' RTF2 control in a database, linked to a Memo field, and am finding it extremely useful (incidentally, in
ACC2002 I'm using the class and withevents rather than the ACC97
backward-compatible module).

I do have one question for Stephen or anyone else familiar with the control: what is the best way to set a default value for new entries? I am interested in doing so because I would like entries to start of with a consistent font face and size (not the bold System font it defaults to), and possibly other characteristics possible with RTF.

Ideally, one day, we'd be able to set such defaults as a property of the control itself, at the time of form design, but I realize that would require a lot of additional work in designing the Activex control. Failing that, what have people done, or what do they suggest doing, to set a default
value?

I see three basic ways of achieving this: setting a default value in the table design, setting one for the control, and creating code to insert a value (either in the code behind the form or in the code for the class).
Has anyone set up a database that has default values of this sort?

Thanks,

Bruce Rusk


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
Nov 12 '05 #3

P: n/a
Thanks for your reply; I guess the first message you sent never made it to
my Usenet server.

I realize that you were somehow accessing the DLL directly, and the
information you provided is exactly what I wanted to find out. Unfortunately
I haven't found anything through Google that would indicate what might be
causing the problem. But I did test the problem by putting some Chinese text
into your RTF2 sample database, and the same issue occurred: lines get cut
off at the bottom of the RTF2 control, apparently because the Richtext DLL
is returning an incorrect value with EN_REQUESTSIZE.

Bruce Rusk

"Stephen Lebans" <St***********@mvps.org> wrote in message
news:NI******************@ursa-nb00s0.nbnet.nb.ca...
Hi Bruce,
first, or second in this case, I did post a reply back to your inquiry
on default settings for my control. I copied it below this message.

I'm not quite sure what you are talking about here in refererence to my
RTF control and its Height method(RTFheight). DO you mean the MS RTF
control when you state it does not have a Height prop? I know it
doesn't. Perhaps you do not understand that my control is not the MS RTF
control nor a wrapper for it. It is instantiated from the RTF DLL
directly.
When you are searching the MS KB or Google you will have to look in the
C++ related material to find developers who are querying the control
directly to ascertain the requried control height to completely display
its contents. Serach for the control message EM_REQUESTRESIZE.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

Nov 12 '05 #4

P: n/a
If I understand you correctly, you mean multiple values for the RTFHeight,
for example when the control extends over more than one page?

Regardless of how many times the values appear, the problem is that the
values are incorrect: lines get cut off and never appear.

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in
message news:3f******@news.microsoft.com...
Don't you get the notification multiple times, with different values each
time?
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.

Nov 12 '05 #5

P: n/a
With the way the RTF2 control works, I don't think it's a matter of
individual line heights but an estimate of the space needed to display all
the text in the record.
"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in
message news:3f********@news.microsoft.com...
Actually, I was referring to the height of the line -- if the last value in is too small, then other text will be cut off, right?
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu...
If I understand you correctly, you mean multiple values for the RTFHeight,
for example when the control extends over more than one page?

Regardless of how many times the values appear, the problem is that the
values are incorrect: lines get cut off and never appear.

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in
message news:3f******@news.microsoft.com...
Don't you get the notification multiple times, with different values

each time?
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.



Nov 12 '05 #6

P: n/a
Bruce can you send me an MDB with a report demonstrating the issue.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu...
With the way the RTF2 control works, I don't think it's a matter of
individual line heights but an estimate of the space needed to display all the text in the record.
"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in
message news:3f********@news.microsoft.com...
Actually, I was referring to the height of the line -- if the last value
in
is too small, then other text will be cut off, right?
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Bruce Rusk" <ho**********@spamless.ucla.edu> wrote in message
news:bj**********@gladiola.noc.ucla.edu...
If I understand you correctly, you mean multiple values for the RTFHeight, for example when the control extends over more than one page?

Regardless of how many times the values appear, the problem is that the values are incorrect: lines get cut off and never appear.

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in message news:3f******@news.microsoft.com...
> Don't you get the notification multiple times, with different

values each
> time?
>
>
> --
> MichKa [MS]
>
> This posting is provided "AS IS" with
> no warranties, and confers no rights.




Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.