| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1840 人关注过本帖
标题:可以实现在 MSFlexGrid控件中第1和第2列中显示一个按钮可以吗?
取消只看楼主 加入收藏
yiyaozjk
Rank: 2
等 级:论坛游民
帖 子:231
专家分:30
注 册:2010-3-10
结帖率:51.67%
收藏
已结贴  问题点数:20 回复次数:1 
可以实现在 MSFlexGrid控件中第1和第2列中显示一个按钮可以吗?
从标题行后面每行的第1、2列都显示一个按钮,点击按钮弹出一个新窗体,将新窗体中选择的内容全部复制到该 MSFlexGrid控件的当前行内来,可以吗???
能否给一个例子。参考一下。
搜索更多相关主题的帖子: 复制 
2011-12-09 20:59
yiyaozjk
Rank: 2
等 级:论坛游民
帖 子:231
专家分:30
注 册:2010-3-10
收藏
得分:0 
是有点头痛了...调整为 ZOrder 为多少? 还是不写为好??
以下是引用wube在2011-12-10 17:26:29的发言:

如果遇上问题~一般会跟ZOrder有关系~
调整一下就行~
这类应用还非常广泛~
之前就贴过可以让MSFLEX的相似行~
可以缩放的功能~
几乎想怎样都行~
做不出来不是VB作不到而是自己功力还不行~
如果遇上问题~一般会跟ZOrder有关系~

调整为 ZOrder 为多少? 还是不写为好??

我用这个MSFlexGrid1/MSHFlexGrid1 真头都痛呀?

一会儿只能合并1-9行的,而不合并 上下 2行的固定标题行?? (即我的代码文字不能实现上下2行10-17列合并),
一会儿复制了别人的MSFlexGrid1控件时,能够实现文字居中,点击选中的行(整行字体为红色,背景色为白,比较美观,而我自己没有找到实现这样的功能代码...)
版主帮我看一下我的代码... (帮我实现上述两个功能的)
(即我的代码文字不能居中,点击选中的行(整行字体不是红色,背景色为白,)

下面是我的代码
Public Sub xshowtitle()
    If Combo1.Text <> "" Then
    '思信厂PMC生产排期计划表
      Label4.Caption = "生产排期" & Combo1.Text & "计划表"
    End If
  MSF1.Clear
  Dim i As Integer
  With MSF1
    .Cols = 29
    .Rows = 3
     .FixedCols = 0
     .FixedRows = 2
     .MergeCells = flexMergeRestrictAll
     'MSHFlexGrid.MergeCells = 2

    ' .FormatString = " |                 |                   |                 |               |                 |                   |                 |               |         10        |          11         |         12   |                 |               |                 |              "
               
                .TextMatrix(0, 0) = ""
                .TextMatrix(0, 1) = "接单日期 "
                .TextMatrix(0, 2) = "工令单号 "
                .TextMatrix(0, 3) = "OC号"
                .TextMatrix(0, 4) = "PO号"
                .TextMatrix(0, 5) = "ITEM号"
                .TextMatrix(0, 6) = "客户名称"
                .TextMatrix(0, 7) = "产品名称"
                .TextMatrix(0, 8) = "数量"
                .TextMatrix(0, 9) = "交货日期"
                 For i = 10 To 17
                  .TextMatrix(0, i) = Combo1.Text
                 Next
                .TextMatrix(1, 1) = ""
                .TextMatrix(1, 2) = ""
                .TextMatrix(0, 18) = "总工价"
                .TextMatrix(0, 19) = "总工时"
                .TextMatrix(0, 20) = "工人数量"
                .TextMatrix(0, 21) = "所需天数"
                .TextMatrix(0, 22) = "预计开始期"
                .TextMatrix(0, 23) = "预计完成期"
                .TextMatrix(0, 24) = "实际开始日期"
                .TextMatrix(0, 25) = "实际完成日期"
                .TextMatrix(0, 26) = "已完成数"
                .TextMatrix(0, 27) = "结余数量"
                .TextMatrix(0, 28) = "备注"
                 
                 Select Case Combo1.Text
                        Case "喷油部"
                            .TextMatrix(1, 10) = "大枪工价"
                            .TextMatrix(1, 11) = "小枪胭脂"
                            .TextMatrix(1, 12) = "手绘工价"
                            .TextMatrix(1, 13) = "抹油工价"
                            .TextMatrix(1, 14) = "其它部门1"
                            .TextMatrix(1, 15) = "其它部门2"
                            .TextMatrix(1, 16) = "其它部门3"
                            .TextMatrix(1, 17) = "其它部门4"
                       Case "吸塑部"
                            .TextMatrix(1, 10) = "吸塑部1"
                            .TextMatrix(1, 11) = "吸塑部1"
                            .TextMatrix(1, 12) = "吸塑部1"
                            .TextMatrix(1, 13) = "吸塑部1"
                            .TextMatrix(1, 14) = "其它部门1"
                            .TextMatrix(1, 15) = "其它部门2"
                            .TextMatrix(1, 16) = "其它部门3"
                            .TextMatrix(1, 17) = "其它部门4"
                       Case "装配部"
                            .TextMatrix(1, 10) = "装配部1"
                            .TextMatrix(1, 11) = "装配部1"
                            .TextMatrix(1, 12) = "装配部1"
                            .TextMatrix(1, 13) = "装配部1"
                            .TextMatrix(1, 14) = "其它部门1"
                            .TextMatrix(1, 15) = "其它部门2"
                            .TextMatrix(1, 16) = "其它部门3"
                            .TextMatrix(1, 17) = "其它部门4"
                       Case "橡胶部"
                            .TextMatrix(1, 10) = "橡胶部1"
                            .TextMatrix(1, 11) = "橡胶部1"
                            .TextMatrix(1, 12) = "橡胶部1"
                            .TextMatrix(1, 13) = "橡胶部1"
                            .TextMatrix(1, 14) = "其它部门1"
                            .TextMatrix(1, 15) = "其它部门2"
                            .TextMatrix(1, 16) = "其它部门3"
                            .TextMatrix(1, 17) = "其它部门4"
                       Case "包装部"
                            .TextMatrix(1, 10) = "包装部1"
                            .TextMatrix(1, 11) = "包装部1"
                            .TextMatrix(1, 12) = "包装部1"
                            .TextMatrix(1, 13) = "包装部1"
                            .TextMatrix(1, 14) = "其它部门1"
                            .TextMatrix(1, 15) = "其它部门2"
                            .TextMatrix(1, 16) = "其它部门3"
                            .TextMatrix(1, 17) = "其它部门4"
                      End Select
                .MergeCol(0) = True
                .MergeRow(0) = True
                .MergeCol(1) = True
                .MergeRow(1) = True
    .ColWidth(0) = 50
    .ColWidth(1) = 1100
    .ColWidth(2) = 1300
    .ColWidth(3) = 1500
    .ColWidth(4) = 1100
    .ColWidth(5) = 1600
    .ColWidth(6) = 1600
    .ColWidth(7) = 1600
    .ColWidth(8) = 700
    .ColWidth(9) = 1200
    .ColWidth(10) = 1000
    .ColWidth(11) = 1000
    .ColWidth(12) = 1000
    .ColWidth(13) = 1000
    .ColWidth(14) = 1000
    .ColWidth(15) = 1000
    .ColWidth(16) = 1000
    .ColWidth(17) = 1000
    '.ColWidth(16) = 1500
   
    For i = 1 To 15
      .ColAlignment(i) = 4
    Next i
  
    .FillStyle = flexFillSingle
    .Col = 0
    .Row = 0
    .RowSel = 1
    .ColSel = .Cols - 1
    .CellAlignment = 4
    End With
End Sub



2011-12-16 22:03
快速回复:可以实现在 MSFlexGrid控件中第1和第2列中显示一个按钮可以吗?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018823 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved