Hi all!

I have problem with a tooltip for a combo inside a grid. The mouse pointer
over the combo does not immediately fire the tooltiptext as expected.

The user must first focus the combo with a click. After that the tooltip
appear.

Is there a workaround for this?

Best regards
Christina

Re: Combo in a grid - tooltip fails by Roger

Roger
Fri Apr 06 10:42:43 CDT 2007

"Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message
news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl
> Hi all!
>
> I have problem with a tooltip for a combo inside a grid. The mouse
> pointer over the combo does not immediately fire the tooltiptext as
> expected.
> The user must first focus the combo with a click. After that the
> tooltip appear.
>
> Is there a workaround for this?

Not a workaround but a feature! <s>
Use the Grid.Column's ToolTipText property.

-Roger




Re: Combo in a grid - tooltip fails by Ch

Ch
Fri Apr 06 10:53:41 CDT 2007

Thank you Roger!

The problem is s little bit more complicated.I need the ability to relate
the tooltip to a specific combo among others in the grid.

See my code in the combo´s mouseenter below:

* tooltiptext
LOCAL lnWidthConstant,lnFontW,lnTextwidth
lnWidthConstant = 1.3
lnFontW = FONTMETRIC(6,this.FontName,this.FontSize, 'N')
lnTextwidth =
TXTWIDTH(RTRIM(this.displayvalue),this.FontName,this.FontSize,'N')

IF lnWidthConstant * lnFontW * lnTextwidth > this.width
this.ToolTipText = ALLTRIM(this.displayvalue) + CHR(13) + CHR(13) +
ALLTRIM(pcAyLabels(1693))
ELSE
this.ToolTipText = ALLTRIM(pcAyLabels(1693))
ENDIF

Best regards
Christina




"Roger Ansell" <notmyreal@emailaddress.com> skrev i meddelandet
news:uY6JKIGeHHA.4128@TK2MSFTNGP05.phx.gbl...
> "Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message
> news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl
>> Hi all!
>>
>> I have problem with a tooltip for a combo inside a grid. The mouse
>> pointer over the combo does not immediately fire the tooltiptext as
>> expected.
>> The user must first focus the combo with a click. After that the
>> tooltip appear.
>>
>> Is there a workaround for this?
>
> Not a workaround but a feature! <s>
> Use the Grid.Column's ToolTipText property.
>
> -Roger
>
>
>



Re: Combo in a grid - tooltip fails by imaginecorp

imaginecorp
Sat Apr 07 21:22:59 CDT 2007

Hello Christine:
Amazing, thats my code Or what I had posted on tek-tips F&Q, glad you are
using it. To solve the problem;
In the columns Mouse Enter put
this.<<comboboxname>>.mouseenter()
Any time you put code, in the grids column child always reference it in the
column object
--
Mohammed Ashruff
www.imaginecorp.com

"Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message
news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl...
> Hi all!
>
> I have problem with a tooltip for a combo inside a grid. The mouse pointer
> over the combo does not immediately fire the tooltiptext as expected.
>
> The user must first focus the combo with a click. After that the tooltip
> appear.
>
> Is there a workaround for this?
>
> Best regards
> Christina
>



Re: Combo in a grid - tooltip fails by Ch

Ch
Sun Apr 08 11:35:54 CDT 2007

Hi Mohammed!

I didn´t know I hade stolen the code :-).

You wrote:
In the columns Mouse Enter put
this.<<comboboxname>>.mouseenter()

I tried:
* the code below in ColMembSatus.mouseenter
LOCAL lcTip
lcTip = 'Hello this is a tooltiptext'
This.mouseenter(This.cboMemStatus.MouseEnter(lcTip))

And some other alternatives as well.

Nothing happend then the mousepinter was moved over the combo inside the
grid. Is there something I didn´t understand?

Regards
Christina



"imaginecorp" <ashruff@imaginecorp.com> skrev i meddelandet
news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl...
> Hello Christine:
> Amazing, thats my code Or what I had posted on tek-tips F&Q, glad you are
> using it. To solve the problem;
> In the columns Mouse Enter put
> this.<<comboboxname>>.mouseenter()
> Any time you put code, in the grids column child always reference it in
> the column object
> --
> Mohammed Ashruff
> www.imaginecorp.com
>
> "Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message
> news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl...
>> Hi all!
>>
>> I have problem with a tooltip for a combo inside a grid. The mouse
>> pointer over the combo does not immediately fire the tooltiptext as
>> expected.
>>
>> The user must first focus the combo with a click. After that the tooltip
>> appear.
>>
>> Is there a workaround for this?
>>
>> Best regards
>> Christina
>>
>
>



Re: Combo in a grid - tooltip fails by imaginecorp

imaginecorp
Sun Apr 08 12:19:20 CDT 2007

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C779E0.8591AB60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

No, No you did NOT steal the code, it is there for anyone to use;

Try this
*** For Text Box
*** MouseEnter()
If !Empty(This.Value) And Vartype(This.Value) =3D "C"
nSize =3D Fontmetric(6,This.FontName,This.FontSize)
If ((Len(Alltrim(This.Value))*nSize)+nSize) > This.Width
This.ToolTipText =3D Alltrim(This.Value)
Endif
Endif

****** for Combobox (need to adjust for down arrow)
***** MouseEnter()
If !Empty(This.displayValue) And This.onlydescriptions And =
Vartype(This.ControlSource)=3D"C"
nSize =3D Fontmetric(6,This.FontName,This.FontSize)
If ((Len(Alltrim(This.DisplayValue))*nSize)+30) > This.Width
This.ToolTipText =3D Alltrim(This.DisplayValue)
Endif
Endif
*********************************************************************

**** Grid Column MouseEnter()
this.<<controlname>>.mouseenter()

Controname =3D whatever you have named the textbox/combobox

This will display the text Only if it is Too wide to fit.

--=20
Mohammed Ashruff
www.imaginecorp.com




"Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message =
news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl...
> Hi Mohammed!
>=20
> I didn=B4t know I hade stolen the code :-).
>=20
> You wrote:
> In the columns Mouse Enter put
> this.<<comboboxname>>.mouseenter()
>=20
> I tried:
> * the code below in ColMembSatus.mouseenter
> LOCAL lcTip
> lcTip =3D 'Hello this is a tooltiptext'
> This.mouseenter(This.cboMemStatus.MouseEnter(lcTip))
>=20
> And some other alternatives as well.
>=20
> Nothing happend then the mousepinter was moved over the combo inside =
the=20
> grid. Is there something I didn=B4t understand?
>=20
> Regards
> Christina
>=20
>=20
>=20
> "imaginecorp" <ashruff@imaginecorp.com> skrev i meddelandet=20
> news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl...
>> Hello Christine:
>> Amazing, thats my code Or what I had posted on tek-tips F&Q, glad you =
are=20
>> using it. To solve the problem;
>> In the columns Mouse Enter put
>> this.<<comboboxname>>.mouseenter()
>> Any time you put code, in the grids column child always reference it =
in=20
>> the column object
>> --=20
>> Mohammed Ashruff
>> www.imaginecorp.com
>>
>> "Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message=20
>> news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl...
>>> Hi all!
>>>
>>> I have problem with a tooltip for a combo inside a grid. The mouse=20
>>> pointer over the combo does not immediately fire the tooltiptext as=20
>>> expected.
>>>
>>> The user must first focus the combo with a click. After that the =
tooltip=20
>>> appear.
>>>
>>> Is there a workaround for this?
>>>
>>> Best regards
>>> Christina
>>>
>>
>>=20
>=20
>
------=_NextPart_000_0012_01C779E0.8591AB60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>No, No you did NOT steal the code, it =
is there for=20
anyone to use;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Try this</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*** For Text Box</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*** MouseEnter()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If !Empty(This.Value) And =
Vartype(This.Value) =3D=20
"C"<BR>&nbsp;&nbsp;&nbsp; nSize =3D=20
Fontmetric(6,This.FontName,This.FontSize)<BR>&nbsp;&nbsp;&nbsp; If=20
((Len(Alltrim(This.Value))*nSize)+nSize) &gt; =
This.Width<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; This.ToolTipText =3D =
Alltrim(This.Value)<BR>&nbsp;&nbsp;&nbsp;=20
Endif<BR>Endif<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>****** for Combobox (need to adjust for =
down=20
arrow)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>***** MouseEnter()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If !Empty(This.displayValue) And=20
This.onlydescriptions And=20
Vartype(This.ControlSource)=3D"C"<BR>&nbsp;&nbsp;&nbsp;&nbsp; nSize =3D=20
Fontmetric(6,This.FontName,This.FontSize)<BR>&nbsp;&nbsp;&nbsp; &nbsp;If =

((Len(Alltrim(This.DisplayValue))*nSize)+30) &gt;=20
This.Width<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;This.ToolTipText=20
=3D Alltrim(This.DisplayValue)<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;Endif<BR>Endif<BR>*************************************************=
********************</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>**** Grid Column =
MouseEnter()</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>this.&lt;&lt;controlname&gt;&gt;.mouseenter()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Controname =3D whatever you have named =
the=20
textbox/combobox</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This will display the text Only if it =
is Too wide=20
to fit.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>-- <BR>Mohammed Ashruff<BR><A=20
href=3D"http://www.imaginecorp.com">www.imaginecorp.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Ch Lofberg" &lt;</FONT><A=20
href=3D"mailto:ch.lofberg@eurosoft-se.com"><FONT face=3DArial=20
size=3D2>ch.lofberg@eurosoft-se.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote=20
in message </FONT><A =
href=3D"news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl"><FONT=20
face=3DArial =
size=3D2>news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; =
Hi=20
Mohammed!<BR>&gt; <BR>&gt; I didn=B4t know I hade stolen the code =
:-).<BR>&gt;=20
<BR>&gt; You wrote:<BR>&gt;&nbsp;In the columns Mouse Enter=20
put<BR>&gt;&nbsp;this.&lt;&lt;comboboxname&gt;&gt;.mouseenter()<BR>&gt; =
<BR>&gt;=20
I tried:<BR>&gt; * the code below in ColMembSatus.mouseenter<BR>&gt; =
LOCAL=20
lcTip<BR>&gt; lcTip =3D 'Hello this is a tooltiptext'<BR>&gt;=20
This.mouseenter(This.cboMemStatus.MouseEnter(lcTip))<BR>&gt; <BR>&gt; =
And some=20
other alternatives as well.<BR>&gt; <BR>&gt; Nothing happend then the=20
mousepinter was moved over the combo inside the <BR>&gt; grid. Is there=20
something I didn=B4t understand?<BR>&gt; <BR>&gt; Regards<BR>&gt;=20
Christina<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; "imaginecorp" &lt;</FONT><A =

href=3D"mailto:ashruff@imaginecorp.com"><FONT face=3DArial=20
size=3D2>ashruff@imaginecorp.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; skrev i=20
meddelandet <BR>&gt; </FONT><A=20
href=3D"news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl"><FONT face=3DArial=20
size=3D2>news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>&gt;&gt; Hello Christine:<BR>&gt;&gt; Amazing, thats my =
code Or=20
what I had posted on tek-tips F&amp;Q, glad you are <BR>&gt;&gt; using =
it. To=20
solve the problem;<BR>&gt;&gt; In the columns Mouse Enter =
put<BR>&gt;&gt;=20
this.&lt;&lt;comboboxname&gt;&gt;.mouseenter()<BR>&gt;&gt; Any time you =
put=20
code, in the grids column child always reference it in <BR>&gt;&gt; the =
column=20
object<BR>&gt;&gt; -- <BR>&gt;&gt; Mohammed Ashruff<BR>&gt;&gt; =
</FONT><A=20
href=3D"http://www.imaginecorp.com"><FONT face=3DArial=20
size=3D2>www.imaginecorp.com</FONT></A><BR><FONT face=3DArial=20
size=3D2>&gt;&gt;<BR>&gt;&gt; "Ch Lofberg" &lt;</FONT><A=20
href=3D"mailto:ch.lofberg@eurosoft-se.com"><FONT face=3DArial=20
size=3D2>ch.lofberg@eurosoft-se.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote=20
in message <BR>&gt;&gt; </FONT><A=20
href=3D"news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl"><FONT face=3DArial=20
size=3D2>news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>&gt;&gt;&gt; Hi all!<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; I =
have=20
problem with a tooltip for a combo inside a grid. The mouse =
<BR>&gt;&gt;&gt;=20
pointer over the combo does not immediately fire the tooltiptext as=20
<BR>&gt;&gt;&gt; expected.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; The user must =
first=20
focus the combo with a click. After that the tooltip <BR>&gt;&gt;&gt;=20
appear.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Is there a workaround for=20
this?<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Best regards<BR>&gt;&gt;&gt;=20
Christina<BR>&gt;&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; <BR>&gt;=20
<BR>&gt;</FONT></BODY></HTML>

------=_NextPart_000_0012_01C779E0.8591AB60--


Re: Combo in a grid - tooltip fails by Ch

Ch
Sun Apr 08 13:35:31 CDT 2007

This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C77A1D.75E1EFD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Mohammed

* code in the column=B4s mouseenter
this.cboMemStatus.mouseenter() && noting happens

As said before - the problem is NOT the code for decision if the tooltip =
should appear because of its length.=20

The problem is that the tooltip doesn=B4t appear at all if user don=B4t =
klick the combo.

Christina

"imaginecorp" <ashruff@imaginecorp.com> skrev i meddelandet =
news:epZdPIgeHHA.4032@TK2MSFTNGP02.phx.gbl...
No, No you did NOT steal the code, it is there for anyone to use;

Try this
*** For Text Box
*** MouseEnter()
If !Empty(This.Value) And Vartype(This.Value) =3D "C"
nSize =3D Fontmetric(6,This.FontName,This.FontSize)
If ((Len(Alltrim(This.Value))*nSize)+nSize) > This.Width
This.ToolTipText =3D Alltrim(This.Value)
Endif
Endif

****** for Combobox (need to adjust for down arrow)
***** MouseEnter()
If !Empty(This.displayValue) And This.onlydescriptions And =
Vartype(This.ControlSource)=3D"C"
nSize =3D Fontmetric(6,This.FontName,This.FontSize)
If ((Len(Alltrim(This.DisplayValue))*nSize)+30) > This.Width
This.ToolTipText =3D Alltrim(This.DisplayValue)
Endif
Endif
*********************************************************************

**** Grid Column MouseEnter()
this.<<controlname>>.mouseenter()

Controname =3D whatever you have named the textbox/combobox

This will display the text Only if it is Too wide to fit.

--=20
Mohammed Ashruff
www.imaginecorp.com




"Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message =
news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl...
> Hi Mohammed!
>=20
> I didn=B4t know I hade stolen the code :-).
>=20
> You wrote:
> In the columns Mouse Enter put
> this.<<comboboxname>>.mouseenter()
>=20
> I tried:
> * the code below in ColMembSatus.mouseenter
> LOCAL lcTip
> lcTip =3D 'Hello this is a tooltiptext'
> This.mouseenter(This.cboMemStatus.MouseEnter(lcTip))
>=20
> And some other alternatives as well.
>=20
> Nothing happend then the mousepinter was moved over the combo inside =
the=20
> grid. Is there something I didn=B4t understand?
>=20
> Regards
> Christina
>=20
>=20
>=20
> "imaginecorp" <ashruff@imaginecorp.com> skrev i meddelandet=20
> news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl...
>> Hello Christine:
>> Amazing, thats my code Or what I had posted on tek-tips F&Q, glad =
you are=20
>> using it. To solve the problem;
>> In the columns Mouse Enter put
>> this.<<comboboxname>>.mouseenter()
>> Any time you put code, in the grids column child always reference =
it in=20
>> the column object
>> --=20
>> Mohammed Ashruff
>> www.imaginecorp.com
>>
>> "Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message=20
>> news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl...
>>> Hi all!
>>>
>>> I have problem with a tooltip for a combo inside a grid. The mouse =

>>> pointer over the combo does not immediately fire the tooltiptext =
as=20
>>> expected.
>>>
>>> The user must first focus the combo with a click. After that the =
tooltip=20
>>> appear.
>>>
>>> Is there a workaround for this?
>>>
>>> Best regards
>>> Christina
>>>
>>
>>=20
>=20
>
------=_NextPart_000_001B_01C77A1D.75E1EFD0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Mohammed</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>* code in the&nbsp;column=B4s =
mouseenter</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>this.cboMemStatus.mouseenter() =
&amp;&amp; noting=20
happens</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As said before - the problem is NOT the =
code for=20
decision if the tooltip should appear because of its length. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The problem is that the tooltip =
doesn=B4t appear at=20
all if user don=B4t klick the combo.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Christina</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"imaginecorp" &lt;<A=20
=
href=3D"mailto:ashruff@imaginecorp.com">ashruff@imaginecorp.com</A>&gt; =
skrev i=20
meddelandet <A=20
=
href=3D"news:epZdPIgeHHA.4032@TK2MSFTNGP02.phx.gbl">news:epZdPIgeHHA.4032=
@TK2MSFTNGP02.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>No, No you did NOT steal the code, it =
is there=20
for anyone to use;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Try this</FONT></DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*** For Text Box</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>*** MouseEnter()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If !Empty(This.Value) And =
Vartype(This.Value) =3D=20
"C"<BR>&nbsp;&nbsp;&nbsp; nSize =3D=20
Fontmetric(6,This.FontName,This.FontSize)<BR>&nbsp;&nbsp;&nbsp; If=20
((Len(Alltrim(This.Value))*nSize)+nSize) &gt; =
This.Width<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; This.ToolTipText =3D=20
Alltrim(This.Value)<BR>&nbsp;&nbsp;&nbsp; =
Endif<BR>Endif<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>****** for Combobox (need to adjust =
for down=20
arrow)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>***** MouseEnter()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If !Empty(This.displayValue) And=20
This.onlydescriptions And=20
Vartype(This.ControlSource)=3D"C"<BR>&nbsp;&nbsp;&nbsp;&nbsp; nSize =
=3D=20
Fontmetric(6,This.FontName,This.FontSize)<BR>&nbsp;&nbsp;&nbsp; =
&nbsp;If=20
((Len(Alltrim(This.DisplayValue))*nSize)+30) &gt;=20
This.Width<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;This.ToolTipText =3D=20
Alltrim(This.DisplayValue)<BR>&nbsp;&nbsp;&nbsp;=20
=
&nbsp;Endif<BR>Endif<BR>*************************************************=
********************</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>**** Grid Column =
MouseEnter()</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>this.&lt;&lt;controlname&gt;&gt;.mouseenter()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Controname =3D whatever you have =
named the=20
textbox/combobox</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This will display the text Only if it =
is Too wide=20
to fit.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>-- <BR>Mohammed Ashruff<BR><A=20
=
href=3D"http://www.imaginecorp.com">www.imaginecorp.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Ch Lofberg" &lt;</FONT><A=20
href=3D"mailto:ch.lofberg@eurosoft-se.com"><FONT face=3DArial=20
size=3D2>ch.lofberg@eurosoft-se.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote=20
in message </FONT><A =
href=3D"news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl"><FONT=20
face=3DArial =
size=3D2>news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl</FONT></A><FONT=20
face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; =
Hi=20
Mohammed!<BR>&gt; <BR>&gt; I didn=B4t know I hade stolen the code =
:-).<BR>&gt;=20
<BR>&gt; You wrote:<BR>&gt;&nbsp;In the columns Mouse Enter=20
=
put<BR>&gt;&nbsp;this.&lt;&lt;comboboxname&gt;&gt;.mouseenter()<BR>&gt;=20
<BR>&gt; I tried:<BR>&gt; * the code below in =
ColMembSatus.mouseenter<BR>&gt;=20
LOCAL lcTip<BR>&gt; lcTip =3D 'Hello this is a tooltiptext'<BR>&gt;=20
This.mouseenter(This.cboMemStatus.MouseEnter(lcTip))<BR>&gt; <BR>&gt; =
And some=20
other alternatives as well.<BR>&gt; <BR>&gt; Nothing happend then the=20
mousepinter was moved over the combo inside the <BR>&gt; grid. Is =
there=20
something I didn=B4t understand?<BR>&gt; <BR>&gt; Regards<BR>&gt;=20
Christina<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; "imaginecorp" =
&lt;</FONT><A=20
href=3D"mailto:ashruff@imaginecorp.com"><FONT face=3DArial=20
size=3D2>ashruff@imaginecorp.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; skrev i=20
meddelandet <BR>&gt; </FONT><A=20
href=3D"news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl"><FONT =
face=3DArial=20
size=3D2>news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>&gt;&gt; Hello Christine:<BR>&gt;&gt; Amazing, thats =
my code Or=20
what I had posted on tek-tips F&amp;Q, glad you are <BR>&gt;&gt; using =
it. To=20
solve the problem;<BR>&gt;&gt; In the columns Mouse Enter =
put<BR>&gt;&gt;=20
this.&lt;&lt;comboboxname&gt;&gt;.mouseenter()<BR>&gt;&gt; Any time =
you put=20
code, in the grids column child always reference it in <BR>&gt;&gt; =
the column=20
object<BR>&gt;&gt; -- <BR>&gt;&gt; Mohammed Ashruff<BR>&gt;&gt; =
</FONT><A=20
href=3D"http://www.imaginecorp.com"><FONT face=3DArial=20
size=3D2>www.imaginecorp.com</FONT></A><BR><FONT face=3DArial=20
size=3D2>&gt;&gt;<BR>&gt;&gt; "Ch Lofberg" &lt;</FONT><A=20
href=3D"mailto:ch.lofberg@eurosoft-se.com"><FONT face=3DArial=20
size=3D2>ch.lofberg@eurosoft-se.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote=20
in message <BR>&gt;&gt; </FONT><A=20
href=3D"news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl"><FONT face=3DArial=20
size=3D2>news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>&gt;&gt;&gt; Hi all!<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; I =
have=20
problem with a tooltip for a combo inside a grid. The mouse =
<BR>&gt;&gt;&gt;=20
pointer over the combo does not immediately fire the tooltiptext as=20
<BR>&gt;&gt;&gt; expected.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; The user =
must first=20
focus the combo with a click. After that the tooltip <BR>&gt;&gt;&gt;=20
appear.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Is there a workaround for=20
this?<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Best regards<BR>&gt;&gt;&gt;=20
Christina<BR>&gt;&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; <BR>&gt; =
<BR>&gt;</FONT>=20
</BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001B_01C77A1D.75E1EFD0--


Re: Combo in a grid - tooltip fails by imaginecorp

imaginecorp
Mon Apr 09 16:35:13 CDT 2007

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C77ACD.6F344790
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

do You have the Forms Show Tips set to .T.?
Strange, the Grid works for me...

--=20
Mohammed Ashruff
www.imaginecorp.com
"Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message =
news:OCSBOzgeHHA.4136@TK2MSFTNGP02.phx.gbl...
Mohammed

* code in the column=B4s mouseenter
this.cboMemStatus.mouseenter() && noting happens

As said before - the problem is NOT the code for decision if the =
tooltip should appear because of its length.=20

The problem is that the tooltip doesn=B4t appear at all if user =
don=B4t klick the combo.

Christina

"imaginecorp" <ashruff@imaginecorp.com> skrev i meddelandet =
news:epZdPIgeHHA.4032@TK2MSFTNGP02.phx.gbl...
No, No you did NOT steal the code, it is there for anyone to use;

Try this
*** For Text Box
*** MouseEnter()
If !Empty(This.Value) And Vartype(This.Value) =3D "C"
nSize =3D Fontmetric(6,This.FontName,This.FontSize)
If ((Len(Alltrim(This.Value))*nSize)+nSize) > This.Width
This.ToolTipText =3D Alltrim(This.Value)
Endif
Endif

****** for Combobox (need to adjust for down arrow)
***** MouseEnter()
If !Empty(This.displayValue) And This.onlydescriptions And =
Vartype(This.ControlSource)=3D"C"
nSize =3D Fontmetric(6,This.FontName,This.FontSize)
If ((Len(Alltrim(This.DisplayValue))*nSize)+30) > This.Width
This.ToolTipText =3D Alltrim(This.DisplayValue)
Endif
Endif
=
*********************************************************************

**** Grid Column MouseEnter()
this.<<controlname>>.mouseenter()

Controname =3D whatever you have named the textbox/combobox

This will display the text Only if it is Too wide to fit.

--=20
Mohammed Ashruff
www.imaginecorp.com




"Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message =
news:uY$DYwfeHHA.4636@TK2MSFTNGP03.phx.gbl...
> Hi Mohammed!
>=20
> I didn=B4t know I hade stolen the code :-).
>=20
> You wrote:
> In the columns Mouse Enter put
> this.<<comboboxname>>.mouseenter()
>=20
> I tried:
> * the code below in ColMembSatus.mouseenter
> LOCAL lcTip
> lcTip =3D 'Hello this is a tooltiptext'
> This.mouseenter(This.cboMemStatus.MouseEnter(lcTip))
>=20
> And some other alternatives as well.
>=20
> Nothing happend then the mousepinter was moved over the combo =
inside the=20
> grid. Is there something I didn=B4t understand?
>=20
> Regards
> Christina
>=20
>=20
>=20
> "imaginecorp" <ashruff@imaginecorp.com> skrev i meddelandet=20
> news:%234vWXTYeHHA.208@TK2MSFTNGP05.phx.gbl...
>> Hello Christine:
>> Amazing, thats my code Or what I had posted on tek-tips F&Q, glad =
you are=20
>> using it. To solve the problem;
>> In the columns Mouse Enter put
>> this.<<comboboxname>>.mouseenter()
>> Any time you put code, in the grids column child always reference =
it in=20
>> the column object
>> --=20
>> Mohammed Ashruff
>> www.imaginecorp.com
>>
>> "Ch Lofberg" <ch.lofberg@eurosoft-se.com> wrote in message=20
>> news:e$LjN5FeHHA.284@TK2MSFTNGP05.phx.gbl...
>>> Hi all!
>>>
>>> I have problem with a tooltip for a combo inside a grid. The =
mouse=20
>>> pointer over the combo does not immediately fire the tooltiptext =
as=20
>>> expected.
>>>
>>> The user must first focus the combo with a click. After that the =
tooltip=20
>>> appear.
>>>
>>> Is there a workaround for this?
>>>
>>> Best regards
>>> Christina
>>>
>>
>>=20
>=20
>
------=_NextPart_000_0012_01C77ACD.6F344790
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16414" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>do You have the Forms Show Tips set to=20
.T.?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Strange, the Grid works for =
me...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>-- <BR>Mohammed Ashruff<BR><A=20
href=3D"http://www.imaginecorp.com">www.imaginecorp.com</A></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ch Lofberg" &lt;<A=20
=
href=3D"mailto:ch.lofberg@eurosoft-se.com">ch.lofberg@eurosoft-se.com</A>=
&gt;=20
wrote in message <A=20
=
href=3D"news:OCSBOzgeHHA.4136@TK2MSFTNGP02.phx.gbl">news:OCSBOzgeHHA.4136=
@TK2MSFTNGP02.phx.gbl</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Mohammed</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>* code in the&nbsp;column=B4s=20
mouseenter</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>this.cboMemStatus.mouseenter() =
&amp;&amp; noting=20
happens</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As said before - the problem is NOT =
the code for=20
decision if the tooltip should appear because of its length. =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The problem is that the tooltip =
doesn=B4t appear at=20
all if user don=B4t klick the combo.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT fac