请问怎么设置MSFlexGrid的一列为ComboBox,一列为CheckBox,一列为Button?
解决方案 »
- 请教一个使用ADO将access与excel数据互倒的问题
- 怎样对字节数据进行快速的简单正侧匹配,并输出匹配结果
- word 表 index 100分
- 100分 VB 里如何把一个本地文件流传给WEB服务器上的上传组件(如aspupload)
- 急 急!!单选框怎样设置,才能一个都不选择?
- VB里面能够通过me.name得到form的名字,那有没有类似的办法得到函数或者过程的名字
- 1个问题
- 请问如何判断recordset中的某个field的类型,是数字还是字符串或其他?
- 在数据库中如何转义特殊字符
- 如何获得cpu,硬盘,网卡的ID号及IP地址?
- vb远程读取txt文件的问题,高手请进,解决马上给分,全天在线
- ____________vb生成excel报表速度太慢了,请高手给改进或改正方法
guyehanxinlei(孤夜寒心泪)
指点指点
' only interesetd in left button
If Button <> 1 Then Exit Sub
' get cell that was clicked
Dim r&, c&
r = fg.MouseRow
c = fg.MouseCol
' make sure the click was on the sheet
If r < 0 Or c < 0 Then Exit Sub
' make sure the click was on a cell with a button
If Not (fg.Cell(flexcpPicture, r, c) Is imgBtnUp) Then Exit Sub
' make sure the click was on the button (not just on the cell)
' note: this works for right-aligned buttons
Dim d!
d = fg.Cell(flexcpLeft, r, c) + fg.Cell(flexcpWidth, r, c) - X
If d > imgBtnDn.Width Then Exit Sub
' click was on a button: do the work
fg.Cell(flexcpPicture, r, c) = imgBtnDn
MsgBox "Thanks for clicking my custom button!"
fg.Cell(flexcpPicture, r, c) = imgBtnUp
' cancel default processing
' note: this is not strictly necessary in this case, because
' the dialog box already stole the focus etc, but let's be safe.
Cancel = TrueEnd SubPrivate Sub Form_Load() ' initialize grid
fg.Editable = flexEDKbdMouse
fg.AllowUserResizing = flexResizeBoth
' add some buttons to the grid
Dim i%
For i = 2 To 6
fg.Cell(flexcpPicture, i, 2) = imgBtnUp
fg.Cell(flexcpPictureAlignment, i, 2) = flexAlignRightCenter
Next
End SubPrivate Sub Form_Resize()
On Error Resume Next
fg.Move fg.Left, fg.Top, ScaleWidth - 2 * fg.Left, ScaleHeight - fg.Left - fg.Top
End Sub
程序在“imgBtnUp”处出错,说它没定义,要怎么定义?
下拉框效果设置 ColComboList的值类似a|b|c就有a b c三个下来选项