On Dec 22, 2005, at 3:25 PM, Aubrey Todd wrote:

Hi,
Is there a way to put a border around a listbox with multiple columns and rows? I can get borderlines to showup any place I want except the outside edges.


There are several ways to do this. For example, drag a canvas onto your window, then drag your list box onto that so that it is more or less centered within the canvas. The canvas will be the container. Then put code like this into the canvas Paint event:

  g.PenHeight = 6
  g.PenWidth = 6
  g.ForeColor = rgb(200,50,50)
g.DrawRect ListBox1.Left - me.Left -6, ListBox1.Top - me.Top - 6, ListBox1.Width + 12, ListBox1.Height + 12

If your window is resizable, lock the canvas in all four freedoms.

This code draws a plain border, but you can get very creative. Draw a bevel, for example. There is an example in the LR.


Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to