Author Topic: Pop-up Help  (Read 3891 times)

0 Members and 1 Guest are viewing this topic.

sinc

  • Guest
Pop-up Help
« on: February 15, 2008, 06:20:26 PM »
Has anyone tried implementing pop-up help on .NET forms in Autocad?

I'm trying to get balloons to pop open when the user hovers the mouse over a control, but I'm not sure how to proceed.  I can't get a HelpProvider to work, but from the description, it sounds like I don't even want that style of help, even if I could get it to work.  From the description, it sounds like a HelpProvider expects the user to hit F1 to see any of the pop-up balloons, and that's not what I want.  I'm trying to get balloons to popup automatically, just from a mouse hover.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Pop-up Help
« Reply #1 on: February 15, 2008, 06:38:25 PM »
You need to look at input point monitor.  You can start on this post, and read for a couple of pages.  As far as having a bubble pop up, I never got that to work, and I don't think Glenn posted a solution for that either.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Pop-up Help
« Reply #2 on: February 15, 2008, 07:57:19 PM »
Richard,
do you mean
HelpProvider
or ToolTips

Tim
I think sinc is after balloons on the form, not on Acad entities.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Pop-up Help
« Reply #3 on: February 15, 2008, 08:42:29 PM »
Something like ...

Code: [Select]
using WinForms = System.Windows.Forms;
using FormBalloonTest;
[assembly: AcRx.CommandClass(typeof(kdub.Testing.Commands.TestCommands))]

namespace kdub.Testing.Commands
{
    /// <summary>
    /// Summary description for TestCommands Class.
    /// </summary>
    public class TestCommands
    {
        public TestCommands()
        {   //
            // TODO: Add constructor logic here
            //
        }
        [AcRx.CommandMethod("Cmd1")]
        static public void test()
        {
            TestFormForBalloons testForm = new TestFormForBalloons();
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(testForm);

        }
    }
}

Code: [Select]
namespace FormBalloonTest
{
    public partial class TestFormForBalloons : Form
    {
        public TestFormForBalloons()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        private void TestFormForBalloons_Load(object sender, EventArgs e)
        {
            ToolTip toolTip01 = new ToolTip();
           
            toolTip01.AutoPopDelay = 4000;
            toolTip01.InitialDelay = 1000;
            toolTip01.ReshowDelay = 500;
            // Force the ToolTip text to display.
            toolTip01.ShowAlways = true;

            // Set up the ToolTip text.
            toolTip01.SetToolTip(this.button1, "Press Me, Press me .... ");
            toolTip01.SetToolTip(this.textBox1, "Add something inane to the textBox");

        }
    }
}

and the piccy ;
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Pop-up Help
« Reply #4 on: February 15, 2008, 09:01:39 PM »
.. and ;
Code: [Select]

//<<<<<<<<<<
            toolTip01.IsBalloon = true;
            toolTip01.UseAnimation = true;
//>>>>>>>
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Pop-up Help
« Reply #5 on: February 15, 2008, 09:11:12 PM »
The zipped Solution is attached, for anyone interested ..


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

sinc

  • Guest
Re: Pop-up Help
« Reply #6 on: February 15, 2008, 09:37:34 PM »
Perfect!  Thanks, Kerry.  I got off on a wrong tangent trying to deal with that HelpProvider class, and didn't even see the ToolTip one.

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: Pop-up Help
« Reply #7 on: February 15, 2008, 09:39:11 PM »
I'm pretty sure that you can add the tooltip in the properties sheet in the form designer too, you could in VB/A from memory, may save some coding time :)
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

sinc

  • Guest
Re: Pop-up Help
« Reply #8 on: February 15, 2008, 09:49:27 PM »
Yes, you can.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Pop-up Help
« Reply #9 on: February 15, 2008, 09:50:27 PM »
I'm pretty sure that you can add the tooltip in the properties sheet in the form designer too, you could in VB/A from memory, may save some coding time :)

I thought so too Mick, but couldn't see it when I went looking ..  ;-) .. but there may be several reasons for that ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

sinc

  • Guest
Re: Pop-up Help
« Reply #10 on: February 15, 2008, 09:52:47 PM »
It's in the Common Controls.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Pop-up Help
« Reply #11 on: February 15, 2008, 09:56:02 PM »


ahhh .. must be added from the Toolbox first ... too obvious :-)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

sinc

  • Guest
Re: Pop-up Help
« Reply #12 on: February 16, 2008, 10:30:10 AM »


ahhh .. must be added from the Toolbox first ... too obvious :-)

Well, not exactly obvious.  Why is it in with the Common Controls?  Since this component works in a very similar manner to the HelpProvider class, why isn't the ToolTip in the Component section with HelpProvider and the other components?  It seems to me that this component is mis-categorized.  If it had been in the Components section with the HelpProvider, I would have found it myself.

Although really I probably should have seen it anyway.  After all, I've used a fair number of TextBoxes now, and the TextBox is right next to the ToolTip.