如何在MS Flex Grid中动态设置特定行的前景色 [英] How do I set forecolor for specific rows dynamically in MS Flex Grid

查看:85
本文介绍了如何在MS Flex Grid中动态设置特定行的前景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  if (!(strcmp(OilCompany,key)))
{
for int col = 0 ; col< = 5 ; col ++)
{
m_ViewFan.SetCol(col);
m_ViewFan.SetCellForeColor(RGB( 255 155 0 ));
}
}
其他 如果(!(strcmp(OilCompany) ,key1)))
{
for int col = 0 ; col< = 5 ; col ++)
{
m_ViewFan.SetCol(col);
m_ViewFan.SetCellForeColor(RGB( 0 51 102 ));
}
}

总列数为5,行= 300。但我需要动态更改为某些行设置前景色。帮助我..

解决方案

看看这里:在Visual C ++中使用Microsoft Flexgrid [ ^ ]

if(!(strcmp(OilCompany,key)))
                    {
                        for(int col=0;col<=5;col++)
                        {
                            m_ViewFan.SetCol(col);
                            m_ViewFan.SetCellForeColor(RGB(255,155,0));
                        }
                    }
                    else if(!(strcmp(OilCompany,key1)))
                    {
                        for(int col=0;col<=5;col++)
                        {
                            m_ViewFan.SetCol(col);
                            m_ViewFan.SetCellForeColor(RGB(0,51,102));
                        }
                    }

total number of columns is 5, row =300. but i need dynamic changes for setting fore color for some rows. help me..

解决方案

Have a look here: Using the Microsoft Flexgrid in Visual C++[^]


这篇关于如何在MS Flex Grid中动态设置特定行的前景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆