带有行着色的 MS Access VBA 列表框?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1171703/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
MS Access VBA Listbox with row colouring?
提问by A. Murray
I'm trying to put together a little list box, populated from a query, that would have the background colour of its rows as different colours depending on a certain status.
我正在尝试将一个从查询填充的小列表框放在一起,根据特定状态,它的行的背景颜色将作为不同的颜色。
I've done some googling around the subject and it doesn't seem possible using the standard controls that the Access form designer provides. There are some ActiveX controls out there such as ListView and the MS Forms 2.0 Listbox but I can't seem to find any usage guides or references for these controls.
我已经围绕这个主题进行了一些谷歌搜索,似乎无法使用 Access 表单设计器提供的标准控件。有一些 ActiveX 控件,例如 ListView 和 MS Forms 2.0 Listbox,但我似乎找不到这些控件的任何使用指南或参考。
Has anyone had any luck with the above and/or know where do get documentation for the aforementioned ActiveX controls?
有没有人对上述有任何运气和/或知道从哪里获得上述 ActiveX 控件的文档?
Much appreciated, Andy
非常感谢,安迪
回答by Smandoli
You would have to use a sub-form. Listbox lines are not individually format-able.
您将不得不使用子表单。列表框行不能单独格式化。
回答by Smandoli
I'm delighted to report I just found documentation on ListViewthat may be just what you're looking for.
(But for myself, I'm sticking with good ol' sub-forms!)
我很高兴地报告我刚刚在 ListView上找到了可能正是您正在寻找的文档。
(但就我自己而言,我坚持使用好的 ol' 子表单!)

