Rebar Controls with Liberty BASIC

by Bill W.

You've probably seen a rebar control before. In Internet Explorer, they are used to help manage toolbars. Here's a screenshot of a rebar control, with two bands:


As you can see, a rebar control is just a parent window for different bands, which each contain a child control and a text label. They can be moved or resized by the user. By themselves, rebar controls are pretty much useless. But with the help of a child window, they can be much, much more.

A child window is any control, such as a combo box or text box. If you need to add more than one child window to a rebar control, you'll have to use a container control, which is explained by Alyce Watson in an article in Newsletter #108. Brent Thorn also wrote an article concerning container controls in newsletter #128. In my demo, child controls aren't needed. The wrapped version has three subroutines and one function to create and manage the control. While it is only enough for a minimalist implementation of a rebar control, this is really all that is needed.

I couldn't include all the resources needed for this article on one webpage, so you'll have to download a zip file. It contains two Liberty BASIC source files, this article, and a text file containing constants and structures for the rebar control.