.bottom of TextWidthHeight

From: Ronald Dodge (ronald.dodge_at_cfgraphics.com)
Date: 07/23/04


Date: Fri, 23 Jul 2004 16:17:34 -0400

Question for Stephen Lebans or possibly someone else who can answer this
question?

Version: 4.5
Module: modTextHeightWidth
Method: fTextWidthOrHeight

Within the With block of "sRect"

Variable in question: ".Bottom"

Line of code:
lngRet = apiDrawText(hDC, sText, -1, sRect, DT_CALCRECT Or DT_TOP Or _
   DT_LEFT Or DT_WORDBREAK Or DT_EXTERNALLEADING Or DT_EDITCONTROL Or
DT_NOCLIP)

Is there anything that can be done with this line of code to have it
properly calculate the .Bottom variable where the rowsource of a listbox is
an empty string?

Issue I have with this:

When the "RowSource" property of the listbox is set to "", this causes the
function to return a value of 0 (zero) as the line height of a single item
on the listbox, when this is obviously not correct.

Work Around:

Have the code arbutarily put in a string value that is not an empty string
within the "RowSource" property, run the function, reset the "RowSource"
property to "" (empty string).

-- 
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000


Relevant Pages

  • Re: lc() with undefined arg
    ... > undef: 'reverse' in scalar context. ... the value is no longer undef but the empty string. ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)
  • Drop-Down List Box confusion.
    ... This is VFP6 SP5. ... PUBLIC array which I then programmatically made the RowSource (I made ... "Note The Value property of a list can be numeric or character. ... Set the Value property to an empty string if the ...
    (microsoft.public.fox.helpwanted)
  • Re: strange return value
    ... the fact that it's returning an actual empty string is ... but normal behavior for Perl's idea of a boolean. ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)
  • Re: /(foo|)/ vs /(foo)?/
    ... > While looking at someone else's code I came across a regular ... // matches an empty string, so $1 is an empty string ... A subtle but relevant difference. ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)
  • Re: Use of uninitialized value in substitution (s///)
    ... >> Perl converts the undefined value to an empty string, ... My point is that warning or not, the substitution seems to ... so the purpose of the substitution is attained. ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)