掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
MSFlexGridで最初に選択した行のみを反転表示するには? (ID:113875)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
マウスの動作のみ対応してます(キーボードでは複数行選択可のまま) 例えばこんな感じ? [VB6.0] Option Explicit Private mCurrentRow As Integer Private Sub Form_Load() Dim i As Integer With Me.MSHFlexGrid1 .Rows = 10 .Cols = 10 .SelectionMode = flexSelectionByRow For i = .FixedRows To .Rows - 1 .TextArray(Fgi(i, 0)) = i Next For i = .FixedCols To .Cols - 1 .TextArray(Fgi(0, i)) = i Next End With End Sub Function Fgi(r As Integer, c As Integer) As Integer Fgi = c + Me.MSHFlexGrid1.Cols * r End Function Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) With Me.MSHFlexGrid1 .row = mCurrentRow .ColSel = .Cols - 1 End With End Sub Private Sub MSHFlexGrid1_RowColChange() mCurrentRow = Me.MSHFlexGrid1.row End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.