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

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

Post by Rober » Mon, 19 Jan 2004 11:46:04


Hello.

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

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
XXXX@XXXXX.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.
 
 
 

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

Post by Stephen Le » Mon, 19 Jan 2004 12:28:04

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.yqcomputer.com/
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.




tips in a
to
have
that
boxes,
require
class, and
types
shed
code to
in my

 
 
 

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

Post by Rober » Mon, 19 Jan 2004 13:11:33

tephen,

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" < XXXX@XXXXX.COM >
wrote in message news:83nOb.66712$ XXXX@XXXXX.COM ...


 
 
 

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

Post by Rober » Mon, 19 Jan 2004 13:11:33

tephen,

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" < XXXX@XXXXX.COM >
wrote in message news:83nOb.66712$ XXXX@XXXXX.COM ...



 
 
 

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

Post by Stephen Le » Mon, 19 Jan 2004 14:53:13

ou 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" < XXXX@XXXXX.COM > wrote in message
news:VHnOb.11082$ XXXX@XXXXX.COM ...
check
option
controls
for
buttons
I need
< XXXX@XXXXX.COM >
news:83nOb.66712$ XXXX@XXXXX.COM ...
include
what
CheckBox's
these
extend it
I
noticed
types.
control
you
Container
"nospam"

 
 
 

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

Post by Rober » Mon, 19 Jan 2004 15:07:54

tephen,

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" < XXXX@XXXXX.COM >
wrote in message news:dbpOb.66758$ XXXX@XXXXX.COM ...


 
 
 

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

Post by Stephen Le » Mon, 19 Jan 2004 15:23:15

hanks 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" < XXXX@XXXXX.COM > wrote in message
news:_opOb.11141$ XXXX@XXXXX.COM ...
procedure
form,
your
also
original
controls on
problem
and
if I
also
Selectors on.
< XXXX@XXXXX.COM >
news:dbpOb.66758$ XXXX@XXXXX.COM ...
my
ToogleButton
vbCrLf &
EXCEPT
was
balloon
option
Do
different
are
and
message
help
form.
text
to
ToolTip
control
could
Lebans