• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

Making ComboBox Sizable

is there a way that I can make a TComboBox sizable, and also remove it's border?

<Please supply code>

Thanks
0
PPaul
Asked:
PPaul
1 Solution
 
ginsonicCommented:
listening
0
 
Lee_NoverCommented:
dunno bout that, but you check www.torry.net for compos
if you don't want the components just check the code :)
0
 
ITugayCommented:
Hi PPaul,

to remove boreder:

begin
   MakeComboFlat(Combobox1, True);
......

procedure MakeComboFlat(ABox: TWinControl; AFlat: Boolean);
var
  HR: HRgn;
  NR: HRgn;
begin
  if ABox = nil then exit;
  GetWindowRgn(ABox.Handle, HR);
  if AFlat then
    NR := CreateRectRgn(2, 2, ABox.Width - 3, ABox.Height - 3)
  else
    NR := CreateRectRgn(0, 0, ABox.Width, ABox.Height);

  SetWindowRgn(ABox.Handle, NR, True);
  DeleteObject(HR);
end;

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now