Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

Problems dynamically changing helpstring for combobox.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Byron - 27 Apr 2005 22:07 GMT
I am setting the helpstring for all interesting controls to a default in the
form load method.  I am then using the SelectedIndexChanged of a combobox to
dynamically change the help displayed using the popup menu, F1, and the
toolltip depending on the currently selected item in the control.  I pull
details from the item in the currently selected combobox item so the user can
optionally see more information about the item they are selecting.  I have
two questions about this:

1.  Why does the tooltip text change, but not the test that is displayed
when I use F1.

2.  Is there some way to stop the tooltip from popping up momentarily when
the helpstring is changed in code?

This is a snippet of the code I'm using to change the helpstring.

// Construct the help from the information about the ammo type
// currently selected.
this.helpProvider1.SetHelpString(this.cboHEAT, <A bunch of stuff >)
this.toolTip1.SetToolTip(this.cboHEAT,
helpProvider1.GetHelpString(this.cboHEAT));
Durstin Selfridge - 29 Apr 2005 19:24 GMT
I can't reproduce your first problem, but you can solve #2 (which I can
replicate), by setting the tooltip to inactive before you change it, and
then reactivating it.  Using your code snippet, it would read:

// Construct the help from the information about the ammo type
// currently selected.
this.helpProvider1.SetHelpString(this.cboHEAT, <A bunch of stuff >)
this.toolTip1.Active = false;
this.toolTip1.SetToolTip(this.cboHEAT,
helpProvider1.GetHelpString(this.cboHEAT));
this.toolTip1.Active = true;

> I am setting the helpstring for all interesting controls to a default in the
> form load method.  I am then using the SelectedIndexChanged of a combobox to
[quoted text clipped - 17 lines]
> this.toolTip1.SetToolTip(this.cboHEAT,
> helpProvider1.GetHelpString(this.cboHEAT));
Byron - 29 Apr 2005 20:16 GMT
Thanks for the reply.  Your suggestion worked as advertised.  I did something
like that before without success, but I can't remember what it was and it
apparentky wasn't what you suggested.

I still have the first problem, so if anybody else has any ideas let me know
please.

> I can't reproduce your first problem, but you can solve #2 (which I can
> replicate), by setting the tooltip to inactive before you change it, and
[quoted text clipped - 32 lines]
> > this.toolTip1.SetToolTip(this.cboHEAT,
> > helpProvider1.GetHelpString(this.cboHEAT));
durstin - 30 Apr 2005 01:05 GMT
Try changing your <A bunch of stuff> into something simple, like the
cboHeat.SelectedIndex.ToString().  This will tell you whether the problem is
in your bunch of stuff...

> Thanks for the reply.  Your suggestion worked as advertised.  I did something
> like that before without success, but I can't remember what it was and it
[quoted text clipped - 39 lines]
> > > this.toolTip1.SetToolTip(this.cboHEAT,
> > > helpProvider1.GetHelpString(this.cboHEAT));

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.