Format top 5 rows in a list box

M

Mr. Smith

Hi.
Is it possible to format the 5 first rows in a list box differently than the
rest? In example. The 5 first rows are Arial 8pt bold, while the rest is
just Arial 8pt?

Any hints appreciated!

Regards
Mr Smith
 
W

Wayne Morgan

Not to my knowledge with the built-in control. You may be able to find a
third party control with more options.
 
J

John Webb via AccessMonster.com

Hi,

No, it is not possible to format a listbox in the way that you suggest.

I am unsure as to whether you are able to format a listview control in the
same sort of way??

Another possibility would be to create a continuous sub form to put in
place of the listbox; then there are ways of doing as you suggest.

However, I would point out that this is not a simple thing to do, and you
will have to do a lot of work to get the same level of functionality from
the sub form as you currently get from a list box; I would suggest that it
is most likely not worth your time to investigate this method.

Unless anyone out there is aware of another alternative method??

Cheers

John Webb
 
S

Stephen Lebans

The most you could do is add extra spaces to alter the horizontal
alignment of the first 5 rows or prefix each row with say the "*"
character.
For sample code see:
http://www.lebans.com/commandbars.htm
CommandBars.zip is a database containing functions to allow you to view
all of the MS Office CommandBar objects and CommandBarControl objects on
your system.

NEW - Jul. 27/2000 This version also demonstrates how to use a callback
function to fill a ListBox with multiple columns. Shows you how to apply
a limited form of Conditional Formatting to individual rows of the
ListBox.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Top