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

Using Lebans ToolTip Classes with Container Controls (Option Frames, Tab Controls)

P: n/a
Hello.

I have been trying out the Lebans ToolTip Classes at
http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a
form. The classes I am using are located at
http://www.lebans.com/DownloadFiles/A2kTooltip.zip

So far the classes work perfectly, except that now I need to extend it to
support other controls besides the ones given in the example form. I have
gotten it to work with some controls, but not others. I have noticed that
Stephen is using some control-type specific classes to handle text boxes,
combo boxes, and list boxes, but some controls do not appear to require
these extra classes at all to work properly with the main ToolTip class, and
I can't figure out what the differences are between the control types.

Has anyone tried to extend these classes to work with other control types
such as Option Buttons, Check Boxes, and the like? If so, could you shed
some light on how to approach this?

Also, what am I in for if I try to use these classes with Container
controls, such as an Option Group. Do I need to change the Lebans code to
walk through the sub-controls in the container?

Thanks in advance.

Robert
ro**********@nospam-unforgettable.com
NOTE: If you are not a spammer, you are welcome to remove the "nospam" in my
email address to send me an email. Spammers, don't bother.
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Look through the code and you will see that there are two different
types of Tooltip objects.
1) For controls that have a permanent hWnd(Window handle). These include
List, Combo and TextBox controls.
2) For all other controls that do not have a permanent hWnd and are
therefore lightweight controls.

For all other control's we are really simply using the position and
dimensions of the control(s) to tell the ToolTip object when and what
control we are current hovering over.
So for the types of controls you mentioned, Option Buttons, CheckBox's
etc. they are already supported.. Have you even tried to see if these
controls are supported? I just did and they are.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:Mr******************@nwrddc01.gnilink.net...
Hello.

I have been trying out the Lebans ToolTip Classes at
http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a form. The classes I am using are located at
http://www.lebans.com/DownloadFiles/A2kTooltip.zip

So far the classes work perfectly, except that now I need to extend it to support other controls besides the ones given in the example form. I have gotten it to work with some controls, but not others. I have noticed that Stephen is using some control-type specific classes to handle text boxes, combo boxes, and list boxes, but some controls do not appear to require these extra classes at all to work properly with the main ToolTip class, and I can't figure out what the differences are between the control types.

Has anyone tried to extend these classes to work with other control types such as Option Buttons, Check Boxes, and the like? If so, could you shed some light on how to approach this?

Also, what am I in for if I try to use these classes with Container
controls, such as an Option Group. Do I need to change the Lebans code to walk through the sub-controls in the container?

Thanks in advance.

Robert
ro**********@nospam-unforgettable.com
NOTE: If you are not a spammer, you are welcome to remove the "nospam" in my email address to send me an email. Spammers, don't bother.


Nov 12 '05 #2

P: n/a
Stephen,

Thanks for getting back to me so quickly.

Hmm... What am I doing wrong? It works for all control types EXCEPT check
boxes and option buttons (radio buttons). Originally I thought it was
because the option buttons were in an option group, but I put one option
button directly on the form, and it doesn't work either. Even tab controls
work (although I haven't figured out yet how to get a separate balloon for
each tab.)

Is there something in the code I need to switch on to enable option buttons
and check boxes? I noticed some SELECT CASE statements in there. Do I need
to add some cases?

Robert

"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:83*********************@ursa-nb00s0.nbnet.nb.ca...
Look through the code and you will see that there are two different
types of Tooltip objects.
1) For controls that have a permanent hWnd(Window handle). These include
List, Combo and TextBox controls.
2) For all other controls that do not have a permanent hWnd and are
therefore lightweight controls.

For all other control's we are really simply using the position and
dimensions of the control(s) to tell the ToolTip object when and what
control we are current hovering over.
So for the types of controls you mentioned, Option Buttons, CheckBox's
etc. they are already supported.. Have you even tried to see if these
controls are supported? I just did and they are.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:Mr******************@nwrddc01.gnilink.net...
Hello.

I have been trying out the Lebans ToolTip Classes at
http://www.lebans.com/tooltip.htm, to display "balloon" style help

tips in a
form. The classes I am using are located at
http://www.lebans.com/DownloadFiles/A2kTooltip.zip

So far the classes work perfectly, except that now I need to extend it

to
support other controls besides the ones given in the example form. I

have
gotten it to work with some controls, but not others. I have noticed

that
Stephen is using some control-type specific classes to handle text

boxes,
combo boxes, and list boxes, but some controls do not appear to

require
these extra classes at all to work properly with the main ToolTip

class, and
I can't figure out what the differences are between the control types.

Has anyone tried to extend these classes to work with other control

types
such as Option Buttons, Check Boxes, and the like? If so, could you

shed
some light on how to approach this?

Also, what am I in for if I try to use these classes with Container
controls, such as an Option Group. Do I need to change the Lebans

code to
walk through the sub-controls in the container?

Thanks in advance.

Robert
ro**********@nospam-unforgettable.com
NOTE: If you are not a spammer, you are welcome to remove the "nospam"

in my
email address to send me an email. Spammers, don't bother.

Nov 12 '05 #3

P: n/a
Stephen,

Thanks for getting back to me so quickly.

Hmm... What am I doing wrong? It works for all control types EXCEPT check
boxes and option buttons (radio buttons). Originally I thought it was
because the option buttons were in an option group, but I put one option
button directly on the form, and it doesn't work either. Even tab controls
work (although I haven't figured out yet how to get a separate balloon for
each tab.)

Is there something in the code I need to switch on to enable option buttons
and check boxes? I noticed some SELECT CASE statements in there. Do I need
to add some cases?

Robert

"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:83*********************@ursa-nb00s0.nbnet.nb.ca...
Look through the code and you will see that there are two different
types of Tooltip objects.
1) For controls that have a permanent hWnd(Window handle). These include
List, Combo and TextBox controls.
2) For all other controls that do not have a permanent hWnd and are
therefore lightweight controls.

For all other control's we are really simply using the position and
dimensions of the control(s) to tell the ToolTip object when and what
control we are current hovering over.
So for the types of controls you mentioned, Option Buttons, CheckBox's
etc. they are already supported.. Have you even tried to see if these
controls are supported? I just did and they are.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:Mr******************@nwrddc01.gnilink.net...
Hello.

I have been trying out the Lebans ToolTip Classes at
http://www.lebans.com/tooltip.htm, to display "balloon" style help

tips in a
form. The classes I am using are located at
http://www.lebans.com/DownloadFiles/A2kTooltip.zip

So far the classes work perfectly, except that now I need to extend it

to
support other controls besides the ones given in the example form. I

have
gotten it to work with some controls, but not others. I have noticed

that
Stephen is using some control-type specific classes to handle text

boxes,
combo boxes, and list boxes, but some controls do not appear to

require
these extra classes at all to work properly with the main ToolTip

class, and
I can't figure out what the differences are between the control types.

Has anyone tried to extend these classes to work with other control

types
such as Option Buttons, Check Boxes, and the like? If so, could you

shed
some light on how to approach this?

Also, what am I in for if I try to use these classes with Container
controls, such as an Option Group. Do I need to change the Lebans

code to
walk through the sub-controls in the container?

Thanks in advance.

Robert
ro**********@nospam-unforgettable.com
NOTE: If you are not a spammer, you are welcome to remove the "nospam"

in my
email address to send me an email. Spammers, don't bother.


Nov 12 '05 #4

P: n/a
You do not need to modify the ToolTips class at all. I mentioned in my
original post that I had tested for CheckBox, Option and ToogleButton
controls. They all worked the very first time.
Are you placing code behind the form's Load event as is shown in the
sample Form in order to initit the desired Tooltips?

' Set the text for the Notes label.
.SetToolText Me.Lablel_Notes, "I am the Notes Label." & vbCrLf &
"This is the second line!"

' Set the text for the CheckBox control.
.SetToolText Me.CheckBox99, "I am the CheckBox control." & vbCrLf &
"This is the second line!"

Have you perhaps made some changes to my code?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:VH******************@nwrddc01.gnilink.net...
Stephen,

Thanks for getting back to me so quickly.

Hmm... What am I doing wrong? It works for all control types EXCEPT check boxes and option buttons (radio buttons). Originally I thought it was
because the option buttons were in an option group, but I put one option button directly on the form, and it doesn't work either. Even tab controls work (although I haven't figured out yet how to get a separate balloon for each tab.)

Is there something in the code I need to switch on to enable option buttons and check boxes? I noticed some SELECT CASE statements in there. Do I need to add some cases?

Robert

"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message

news:83*********************@ursa-nb00s0.nbnet.nb.ca...
Look through the code and you will see that there are two different
types of Tooltip objects.
1) For controls that have a permanent hWnd(Window handle). These include List, Combo and TextBox controls.
2) For all other controls that do not have a permanent hWnd and are
therefore lightweight controls.

For all other control's we are really simply using the position and
dimensions of the control(s) to tell the ToolTip object when and what control we are current hovering over.
So for the types of controls you mentioned, Option Buttons, CheckBox's etc. they are already supported.. Have you even tried to see if these controls are supported? I just did and they are.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:Mr******************@nwrddc01.gnilink.net...
Hello.

I have been trying out the Lebans ToolTip Classes at
http://www.lebans.com/tooltip.htm, to display "balloon" style help

tips in a
form. The classes I am using are located at
http://www.lebans.com/DownloadFiles/A2kTooltip.zip

So far the classes work perfectly, except that now I need to extend it
to
support other controls besides the ones given in the example form.
I have
gotten it to work with some controls, but not others. I have
noticed that
Stephen is using some control-type specific classes to handle text

boxes,
combo boxes, and list boxes, but some controls do not appear to

require
these extra classes at all to work properly with the main ToolTip

class, and
I can't figure out what the differences are between the control
types.
Has anyone tried to extend these classes to work with other control types
such as Option Buttons, Check Boxes, and the like? If so, could
you shed
some light on how to approach this?

Also, what am I in for if I try to use these classes with
Container controls, such as an Option Group. Do I need to change the Lebans

code to
walk through the sub-controls in the container?

Thanks in advance.

Robert
ro**********@nospam-unforgettable.com
NOTE: If you are not a spammer, you are welcome to remove the

"nospam" in my
email address to send me an email. Spammers, don't bother.



Nov 12 '05 #5

P: n/a
Stephen,

To answer your question, yes I am using modified code. I wrote a procedure
in a standard module that walks through all of the controls on the form,
extracts the ControlTipText from each control, sets the ToolTipText in your
ToolTip class, and then clears the ControlTipText from the control. I
didn't want to have to write code for every form in my application. I also
added a property to the ToolTip class that allows me to override your
ListBox behaviour with a ControlTip string.

To make sure that the problem wasn't in my code, I retrieved your original
Zip file from your website, created a new form, dropped various controls on
it, and coded it in the manner you use in your Customers form. The problem
persisted; every control type on the form worked EXCEPT Option Buttons and
Check Boxes. So I dropped an Option Button and a Check Box onto your
Customers form and, sure enough, they work.

So I began comparing your form with mine, and finally figured out that if I
turned off Record Selectors in my form, the problem goes away! I can also
reproduce the problem in your Customers form by turning Record Selectors on.

I hope you find this useful.

Robert
"Stephen Lebans" <Fo****************************************@linval id.com>
wrote in message news:db*********************@ursa-nb00s0.nbnet.nb.ca...
You do not need to modify the ToolTips class at all. I mentioned in my
original post that I had tested for CheckBox, Option and ToogleButton
controls. They all worked the very first time.
Are you placing code behind the form's Load event as is shown in the
sample Form in order to initit the desired Tooltips?

' Set the text for the Notes label.
.SetToolText Me.Lablel_Notes, "I am the Notes Label." & vbCrLf &
"This is the second line!"

' Set the text for the CheckBox control.
.SetToolText Me.CheckBox99, "I am the CheckBox control." & vbCrLf &
"This is the second line!"

Have you perhaps made some changes to my code?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:VH******************@nwrddc01.gnilink.net...
Stephen,

Thanks for getting back to me so quickly.

Hmm... What am I doing wrong? It works for all control types EXCEPT

check
boxes and option buttons (radio buttons). Originally I thought it was
because the option buttons were in an option group, but I put one

option
button directly on the form, and it doesn't work either. Even tab

controls
work (although I haven't figured out yet how to get a separate balloon

for
each tab.)

Is there something in the code I need to switch on to enable option

buttons
and check boxes? I noticed some SELECT CASE statements in there. Do

I need
to add some cases?

Robert

"Stephen Lebans"

<Fo****************************************@linval id.com>
wrote in message

news:83*********************@ursa-nb00s0.nbnet.nb.ca...
Look through the code and you will see that there are two different
types of Tooltip objects.
1) For controls that have a permanent hWnd(Window handle). These include List, Combo and TextBox controls.
2) For all other controls that do not have a permanent hWnd and are
therefore lightweight controls.

For all other control's we are really simply using the position and
dimensions of the control(s) to tell the ToolTip object when and what control we are current hovering over.
So for the types of controls you mentioned, Option Buttons, CheckBox's etc. they are already supported.. Have you even tried to see if these controls are supported? I just did and they are.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:Mr******************@nwrddc01.gnilink.net...
> Hello.
>
> I have been trying out the Lebans ToolTip Classes at
> http://www.lebans.com/tooltip.htm, to display "balloon" style help
tips in a
> form. The classes I am using are located at
> http://www.lebans.com/DownloadFiles/A2kTooltip.zip
>
> So far the classes work perfectly, except that now I need to extend it to
> support other controls besides the ones given in the example form. I have
> gotten it to work with some controls, but not others. I have noticed that
> Stephen is using some control-type specific classes to handle text
boxes,
> combo boxes, and list boxes, but some controls do not appear to
require
> these extra classes at all to work properly with the main ToolTip
class, and
> I can't figure out what the differences are between the control types. >
> Has anyone tried to extend these classes to work with other control types
> such as Option Buttons, Check Boxes, and the like? If so, could you shed
> some light on how to approach this?
>
> Also, what am I in for if I try to use these classes with Container > controls, such as an Option Group. Do I need to change the Lebans
code to
> walk through the sub-controls in the container?
>
> Thanks in advance.
>
> Robert
> ro**********@nospam-unforgettable.com
> NOTE: If you are not a spammer, you are welcome to remove the "nospam" in my
> email address to send me an email. Spammers, don't bother.
>
>


Nov 12 '05 #6

P: n/a
Thanks for figuring this out Robert. I will place your findings on the
ToolTip Web page.
When I get a chance I will go back and see where the code is failing due
to the RecordSelector prop being enabled.
:-)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:_o******************@nwrddc02.gnilink.net...
Stephen,

To answer your question, yes I am using modified code. I wrote a procedure in a standard module that walks through all of the controls on the form, extracts the ControlTipText from each control, sets the ToolTipText in your ToolTip class, and then clears the ControlTipText from the control. I
didn't want to have to write code for every form in my application. I also added a property to the ToolTip class that allows me to override your
ListBox behaviour with a ControlTip string.

To make sure that the problem wasn't in my code, I retrieved your original Zip file from your website, created a new form, dropped various controls on it, and coded it in the manner you use in your Customers form. The problem persisted; every control type on the form worked EXCEPT Option Buttons and Check Boxes. So I dropped an Option Button and a Check Box onto your
Customers form and, sure enough, they work.

So I began comparing your form with mine, and finally figured out that if I turned off Record Selectors in my form, the problem goes away! I can also reproduce the problem in your Customers form by turning Record Selectors on.
I hope you find this useful.

Robert
"Stephen Lebans" <Fo****************************************@linval id.com> wrote in message

news:db*********************@ursa-nb00s0.nbnet.nb.ca...
You do not need to modify the ToolTips class at all. I mentioned in my original post that I had tested for CheckBox, Option and ToogleButton controls. They all worked the very first time.
Are you placing code behind the form's Load event as is shown in the
sample Form in order to initit the desired Tooltips?

' Set the text for the Notes label.
.SetToolText Me.Lablel_Notes, "I am the Notes Label." & vbCrLf &
"This is the second line!"

' Set the text for the CheckBox control.
.SetToolText Me.CheckBox99, "I am the CheckBox control." & vbCrLf & "This is the second line!"

Have you perhaps made some changes to my code?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Robert" <ro**********@nospam-unforgettable.com> wrote in message
news:VH******************@nwrddc01.gnilink.net...
Stephen,

Thanks for getting back to me so quickly.

Hmm... What am I doing wrong? It works for all control types EXCEPT
check
boxes and option buttons (radio buttons). Originally I thought it
was because the option buttons were in an option group, but I put one

option
button directly on the form, and it doesn't work either. Even tab

controls
work (although I haven't figured out yet how to get a separate balloon for
each tab.)

Is there something in the code I need to switch on to enable
option buttons
and check boxes? I noticed some SELECT CASE statements in there.
Do I need
to add some cases?

Robert

"Stephen Lebans"

<Fo****************************************@linval id.com>
wrote in message

news:83*********************@ursa-nb00s0.nbnet.nb.ca...
> Look through the code and you will see that there are two
different > types of Tooltip objects.
> 1) For controls that have a permanent hWnd(Window handle). These

include
> List, Combo and TextBox controls.
> 2) For all other controls that do not have a permanent hWnd and are > therefore lightweight controls.
>
> For all other control's we are really simply using the position and > dimensions of the control(s) to tell the ToolTip object when and

what
> control we are current hovering over.
> So for the types of controls you mentioned, Option Buttons,

CheckBox's
> etc. they are already supported.. Have you even tried to see if

these
> controls are supported? I just did and they are.
>
>
> --
>
> HTH
> Stephen Lebans
> http://www.lebans.com
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.
>
>
> "Robert" <ro**********@nospam-unforgettable.com> wrote in message > news:Mr******************@nwrddc01.gnilink.net...
> > Hello.
> >
> > I have been trying out the Lebans ToolTip Classes at
> > http://www.lebans.com/tooltip.htm, to display "balloon" style help > tips in a
> > form. The classes I am using are located at
> > http://www.lebans.com/DownloadFiles/A2kTooltip.zip
> >
> > So far the classes work perfectly, except that now I need to

extend it
> to
> > support other controls besides the ones given in the example form. I
> have
> > gotten it to work with some controls, but not others. I have

noticed
> that
> > Stephen is using some control-type specific classes to handle
text > boxes,
> > combo boxes, and list boxes, but some controls do not appear to > require
> > these extra classes at all to work properly with the main ToolTip > class, and
> > I can't figure out what the differences are between the control types.
> >
> > Has anyone tried to extend these classes to work with other

control
> types
> > such as Option Buttons, Check Boxes, and the like? If so,
could you
> shed
> > some light on how to approach this?
> >
> > Also, what am I in for if I try to use these classes with

Container
> > controls, such as an Option Group. Do I need to change the

Lebans > code to
> > walk through the sub-controls in the container?
> >
> > Thanks in advance.
> >
> > Robert
> > ro**********@nospam-unforgettable.com
> > NOTE: If you are not a spammer, you are welcome to remove the

"nospam"
> in my
> > email address to send me an email. Spammers, don't bother.
> >
> >
>



Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.