Update of /cvsroot/pywin32/pywin32/Pythonwin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18152
Modified Files:
win32control.cpp
Log Message:
[ 977395 ] PyCStatusBarCtrl.SetTipText
Index: win32control.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32control.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** win32control.cpp 20 Jan 2004 22:28:55 -0000 1.4
--- win32control.cpp 7 Oct 2004 08:41:17 -0000 1.5
***************
*** 2361,2364 ****
--- 2361,2396 ----
}
+ // @pymethod |PyCStatusBarCtrl|SetTipText|Sets the tooltip text for a pane in a status bar. The status bar must have been created with the afxres.SBT_TOOLTIPS control style to enable ToolTips.
+
+ PyObject *
+ PyCStatusBarCtrl_set_tip_text(PyObject *self, PyObject *args)
+ {
+ int nPane;
+ char *buf;
+
+ CStatusBarCtrl *pSB = GetStatusBarCtrl(self);
+
+ if (!pSB)
+ return NULL;
+
+ // @pyparm int|nPane||The zero-based index of status bar pane to receive the tooltip text.
+ // @pyparm string|text||The string containing the tooltip text.
+
+ // @comm Pay attention, this tooltip text is ONLY displayed in two situations:
+ // <nl>1. When the corresponding pane in the status bar contains only an icon.
+ // <nl>2. When the corresponding pane in the status bar contains text that is truncated due to the size of the pane.
+ // <nl>To make the tooltip appear even if the text is not truncated, you could add additional spaces to the end of the pane text.
+
+ if (!PyArg_ParseTuple(args,
+ "is:SetTipText", &nPane, &buf))
+ return NULL;
+
+ GUI_BGN_SAVE;
+ pSB->SetTipText (nPane, buf); // @pyseemfc CStatusBarCtrl|SetTipText
+ GUI_END_SAVE;
+
+ RETURN_NONE;
+ }
+
// @object PyCStatusBarCtrl|A windows progress bar control. Encapsulates an MFC <c CStatusBarCtrl> class. Derived from <o PyCControl>.
static struct PyMethodDef PyCStatusBarCtrl_methods[] = {
***************
*** 2373,2376 ****
--- 2405,2409 ----
{"SetParts", PyCStatusBarCtrl_set_parts, 1}, // @pymeth SetParts|Sets the number of parts in a status bar control and the coordinate of the right edge of each part.
{"SetText", PyCStatusBarCtrl_set_text, 1}, // @pymeth SetText|Set the text in the given part of a status bar control.
+ {"SetTipText", PyCStatusBarCtrl_set_tip_text, 1}, // @pymeth SetTipText|Sets the tooltip text for a pane in a status bar.
{NULL, NULL}
};
|