// Update Cursor Rect void Window_Selectable::UpdateCursorRect() { int cursor_width = 0; int x = 0; if (index < 0) { SetCursorRect(Rect()); return; } int row = index / column_max; if (row < GetTopRow()) { SetTopRow(row); } else if (row > GetTopRow() + (GetPageRowMax() - 1)) { SetTopRow(row - (GetPageRowMax() - 1)); } if (column_max > 1){ cursor_width = (width / column_max - 16) + 12; x = (index % column_max * cursor_width) - 4 ; } else{ cursor_width = (width / column_max - 16) + 8; x = (index % column_max * (cursor_width + 16)) - 4; } int y = index / column_max * 16 - oy; SetCursorRect(Rect(x, y, cursor_width, 16)); }
void CRGXDeskLogRows::clear() { SetReadOnly(FALSE); SetTopRow(1); MoveCurrentCell(GX_TOPLEFT); SetRowCount(0); Redraw(); SetReadOnly(TRUE); }
void CRGXMainWndGrid::clear() { setGridReadOnly(FALSE); SetTopRow(1); MoveCurrentCell(GX_TOPLEFT); SetRowCount(0); Redraw(); // setGridReadOnly(TRUE); }
/////////////////////////////////////////////////////////////////////////// // Set the highlighted selection /////////////////////////////////////////////////////////////////////////// void CStreetSegmentBrowseGrid::SetRowSelection(int selStart_, int selEnd_) { int oldSelStart = selStart; int oldSelEnd = selEnd; selStart = selStart_; selEnd = selEnd_; if (oldSelStart <= oldSelEnd) { // Unhilight previous selection RedrawRowCol(oldSelStart, 1, oldSelEnd, GetColCount()); } if (selStart <= selEnd) { // Hilight new selection RedrawRowCol(selStart, 1, selEnd, GetColCount()); // Put top of select at top row SetTopRow(selStart); } }