Foxtable(狐表)用户栏目专家坐堂 → [求助]日期填充颜色后,颜色和批注不显示问题


  共有3232人关注过本帖树形打印复制链接

主题:[求助]日期填充颜色后,颜色和批注不显示问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/30 13:07:00 [显示全部帖子]

两者,是不能共存的。如果设置style,就不能画图。

 

改成不设置style,改成也直接画图。


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/30 14:10:00 [显示全部帖子]

1、删除回复本来的drawcell事件代码;

 

2、和画标注、背景颜色一样,设置单元格的颜色;

 

3、不可以;

 

4、读懂画标注、画背景颜色的代码,自食其力,看不懂代码不要做这些功能 http://www.foxtable.com/webhelp/scr/1482.htm

 


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/30 18:44:00 [显示全部帖子]

以下是引用湛江智在2018/5/30 18:33:00的发言:
狐表里面单元格的所有批注窗口,显示和关闭的代码怎么写呢?

 

无法理解你什么意思,上传实例说明。


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/30 21:44:00 [显示全部帖子]

无法理解你的意思,你要打开哪个窗口?

 

foxtable里面设计的窗口是只能打开一个而不能打开多个的。


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/30 22:45:00 [显示全部帖子]

foxtable没有这种功能。

 

如果要做,就动态嵌入控件,参考代码

 

Dim _flex = CurrentTable.grid
_flex.controls.clear
For Each dr As DataRow In DataTables("背景批注").Select("表名 = '" & CurrentTable.name & "'")
    For Each c As String In dr("批注").split("|")
        Dim ary() = c.split(",")
        If c > "" Then
            Dim cell = _flex.GetCellRect(dr("行号"), CurrentTable.Cols(ary(0)).Index+1)
            Dim btn1 As new windows.Forms.label
            btn1.name = "btn" & dr("行号")
            btn1.text = ary(1)
            btn1.left = cell.x+cell.width-10
            btn1.top = cell.y+cell.height-10
            btn1.backcolor = Color.yellow
            btn1.width = 100
            btn1.height = 100
            _flex.controls.add(btn1)
        End If
    Next
Next


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/31 8:56:00 [显示全部帖子]

1、

 

Dim t As Table = Tables("窗口1_Table1")
Dim _flex = t.grid
_flex.controls.clear
For Each dr As DataRow In DataTables("背景批注").Select("表名 = '" & t.datatable.name & "'")
    For Each c As String In dr("批注").split("|")
        Dim ary() = c.split(",")
        If c > "" Then
            Dim cell = _flex.GetCellRect(dr("行号"), t.Cols(ary(0)).Index+1)
            Dim btn1 As new windows.Forms.label
            btn1.name = "btn" & dr("行号")
            btn1.text = ary(1)
            btn1.left = cell.x+cell.width-10
            btn1.top = cell.y+cell.height-10
            btn1.backcolor = Color.yellow
            btn1.width = 100
            btn1.height = 100
            _flex.controls.add(btn1)
        End If
    Next
Next

 

2、出错的例子做一个发上来测试。


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/5/31 12:47:00 [显示全部帖子]

Dim t As Table = Tables("自己的项目_Table1")
Dim _flex = t.grid
_flex.controls.clear
For Each dr As DataRow In DataTables("背景批注").Select("表名 = '" & t.name & "'")
    For Each c As String In dr("批注").split("|")
        Dim ary() = c.split(",")
        If c > "" Then
            Dim i As Integer = t.FindRow("_Identify = " & dr("行号"))
            msgbox(i)
            If i >= 0 Then
                Dim cell = _flex.GetCellRect(i+t.HeaderRows, t.Cols(ary(0)).Index+1)
                Dim btn1 As new windows.Forms.label
                btn1.name = "btn" & i+1
                btn1.text = ary(1)
                btn1.left = cell.x+cell.width-10
                btn1.top = cell.y+cell.height-10
                btn1.backcolor = Color.yellow
                btn1.width = 100
                btn1.height = 100
                _flex.controls.add(btn1)
            End If
        End If
    Next
Next

 回到顶部