REALbasic Listbox control in Mac style line

When you are using Mac OS you can see in many software like iTunes, Adium, AppCleaner, AirRadar a cool looking Mac style Listbox control with white and blue cells. In this quick tutorial we will learn how can we create this kind of effect using REALbasic Listbox control and cell background paint function.

Listbox Cell Background Paint

Everything what we need is a Listbox control available on Window1 class and a code in Listbox1 Function CellBackgroundPaint (). After compiling the project we will get a nice looking Listbox control that we can admire in our application.

1
2
3
4
5
6
if row mod 2 = 0 then
   g.ForeColor = &cFFFFFF // white color
else
   g.ForeColor = &cf3f7fb // blue color
end if
  g.FillRect 0,0, g.Width, g.Height

Author: Jakub Pawlak

I'm interested in all. Currently working on the development of TUTSPOLIS and I hope that in near feature the project will be successful.

5 Responses to “REALbasic Listbox control in Mac style”

  1. Arjun says:

    Really nice information you shared with us. Keep it up!

  2. treasure says:

    sorry but not working for me… i get a syntax error!!

    :(

  3. Jakub Pawlak says:

    Try now, there was a bug in color designation. I used mark # instead of & :)

  4. jasmatuphcreations says:

    How can you chnge the color of the heading font &size, and also the background heading color?

  5. Jakub Pawlak says:

    What do you mean by the heading font and size, and also the background heading color?

Leave a Reply

Copyrights (c) TUTSPOLIS | Powered by Wordpress MU | Inspired at Elegant Themes designed by qbap (HTML5 & CSS3)