[wxPython] Tool tips on ListCtrls

Hello Robin,

The demo for these controls calls
        self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
        wxToolTip_Enable(true)
But this isn't in the documentation, nor do the tool tips appear to work,
for me.
[Incidentally, I'm using 2.2.2 on Windows...]

Am I doing something wrong?

Cheerio, Chris

···

-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@uq.net.au> Phone:(07) 3870 5639
Brisbane, Australia Mobile:(0400) 833 700
-------------------------------------------------------------------------
Thou still unravished bride of quietness, / Thou foster-child of
silence and slow time, / Sylvan historian, who canst thus express / A
flowery tale more sweetly than our rhyme: / What leaf-fringed legend
haunts about thy shape / Of deities or mortals, or of both, / In Tempe
or the dales of Arcady? / What men or gods are these? What maidens
loth? / What mad pursuit? What struggle to escape? / What pipes and
timbrels? What wild ecstasy?
                               - Keats, "Ode on a Grecian Urn", I

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

Hello Robin,

The demo for these controls calls
        self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
        wxToolTip_Enable(true)
But this isn't in the documentation, nor do the tool tips appear to work,
for me.
[Incidentally, I'm using 2.2.2 on Windows...]

I don't know why it doesn't work on the list ctrl on wxMSW, it does on wxGTK
and also on other types of controls on wxMSW...

wxWindow has these methods (from windows.i):

    %name(SetToolTipString)void SetToolTip(const wxString &tip);
    void SetToolTip(wxToolTip *tooltip);
    wxToolTip* GetToolTip();

and there is this in misc2.i:

class wxToolTip {
public:
    wxToolTip(const wxString &tip);

    void SetTip(const wxString& tip);
    wxString GetTip();
    wxWindow *GetWindow();
};

%inline %{
    void wxToolTip_Enable(bool flag) {
        wxToolTip::Enable(flag);
    }

    void wxToolTip_SetDelay(long milliseconds) {
        wxToolTip::SetDelay(milliseconds);
    }
%}

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I get the tooltip with wxGtk (wxPython-2.2.0) but it appears at the bottom of
the frame/control. I would have thought that the tooltip should appear where
the mouse is or maybe in the center of the control.

Brendan Simon.

Robin Dunn wrote:

···

> Hello Robin,
>
> The demo for these controls calls
> self.list.SetToolTip(wxToolTip("This is a ToolTip!"))
> wxToolTip_Enable(true)
> But this isn't in the documentation, nor do the tool tips appear to work,
> for me.
> [Incidentally, I'm using 2.2.2 on Windows...]
>

I don't know why it doesn't work on the list ctrl on wxMSW, it does on wxGTK
and also on other types of controls on wxMSW...

wxWindow has these methods (from windows.i):

    %name(SetToolTipString)void SetToolTip(const wxString &tip);
    void SetToolTip(wxToolTip *tooltip);
    wxToolTip* GetToolTip();

and there is this in misc2.i:

class wxToolTip {
public:
    wxToolTip(const wxString &tip);

    void SetTip(const wxString& tip);
    wxString GetTip();
    wxWindow *GetWindow();
};

%inline %{
    void wxToolTip_Enable(bool flag) {
        wxToolTip::Enable(flag);
    }

    void wxToolTip_SetDelay(long milliseconds) {
        wxToolTip::SetDelay(milliseconds);
    }
%}

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users