MSHFLEXGRID1 Tips (1) [How to make MSHFLEXGRID can only be selected]

xiaoxiao2021-03-06  73

MshflexGrid controls can be selected when clicked, but sometimes we need only one line, there is a tip:

Option explicitprivate suform_load () DIM I as integer, J AS integerwith mshflexgrid1.rows = 10.cols = 4for i = 1 to 9.TextMatrix (i, 0) = "" & I & "line" for j = 1 to 3.TextMatrix (0, j) = "of" & j & "column" .TextMatrix (i, j) = i & "," & jNextNext.SelectionMode = flexSelectionByRow.BackColorSel = vbGreen.ForeColorSel = vbRedEnd WithEnd SubPrivate Sub MSHFlexGrid1_MouseDown ( Button as integer, x askLE, Y askLE) with mshflexgrid1.row = .mouserow .col = 0 .colsel = .cols - 1 End welhend Sub

转载请注明原文地址:https://www.9cbs.com/read-120690.html

New Post(0)