// @pymethod int|PyCEdit|GetFirstVisibleLine|Returns zero-based index of the topmost visible line.
static PyObject *
PyCEdit_get_first_visible(PyObject *self, PyObject *args)
{
	CHECK_NO_ARGS(args);
	CEdit *pEdit = GetEditCtrl(self);
	if (!pEdit)
		return NULL;
	GUI_BGN_SAVE;
	int rc = pEdit->GetFirstVisibleLine();
	GUI_END_SAVE;

	return Py_BuildValue("i",rc); // @pyseemfc CEdit|GetFirstVisibleLine
	// @rdesc The zero-based index of the topmost visible line. For single-line edit controls, the return value is 0.
}
Esempio n. 2
0
void CTitlePaneDlg::UpdateLine(CEdit& editSrc, CEdit& editTag)
{
	int nSrcLine = editSrc.GetFirstVisibleLine();
	int nTagLine = editTag.GetFirstVisibleLine();
	editTag.LineScroll(nSrcLine - nTagLine);
}