您的位置:程序门 -> vb -> 基础类



msflexgrid控件问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


msflexgrid控件问题[已结贴,结贴人:thw19850316]
发表于:2007-04-09 14:56:26 楼主
请问怎么设置msflexgrid的一列为combobox,一列为checkbox,一列为button?
发表于:2007-04-09 15:02:031楼 得分:0
发表于:2007-04-09 15:44:482楼 得分:0
有没有其他不要注册的控件可以用?
发表于:2007-04-09 15:48:503楼 得分:0
lz的想法是好
可做不到
发表于:2007-04-09 16:14:234楼 得分:0
你是要将所有的行实现哪样的效果还是当鼠标单击或双击的时候实现哪个效果呢,
发表于:2007-04-09 16:29:255楼 得分:0
vsflexgrid可以做到
发表于:2007-04-09 16:47:486楼 得分:0
vsflexgrid我只知道做复选筐的,把celldatatype设置成boolean就行了,其他的不知道,
guyehanxinlei(孤夜寒心泪)
指点指点
发表于:2007-04-09 17:09:587楼 得分:20
option   explicit

private   sub   fg_beforemousedown(byval   button   as   integer,   byval   shift   as   integer,   byval   x   as   single,   byval   y   as   single,   cancel   as   boolean)
       
        '   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   =   true

end   sub

private   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   sub

private   sub   form_resize()
        on   error   resume   next
        fg.move   fg.left,   fg.top,   scalewidth   -   2   *   fg.left,   scaleheight   -   fg.left   -   fg.top
end   sub
发表于:2007-04-10 10:32:368楼 得分:0
guyehanxinlei(孤夜寒心泪)
程序在“imgbtnup”处出错,说它没定义,要怎么定义?
发表于:2007-04-10 13:59:269楼 得分:0
帮帮忙啊!
发表于:2007-04-10 14:00:5210楼 得分:0
花钱买一个吧,最多300
发表于:2007-04-10 14:14:5011楼 得分:0
vsflexgrid的按钮效果是,combosearch设置3   editable设置为2   showcombobutton设置为2
下拉框效果设置   colcombolist的值类似a ¦b ¦c就有a   b   c三个下来选项


快速检索

最新资讯
热门点击