Questions tagged [vcl]

This tag is used for questions regarding the Visual Component Library used in Borland/CodeGear/Embarcadero Delphi and C++Builder products as well as Python GUI apps. Do not confuse this with the Varnish Configuration Language (VCL). Use the "varnish-vcl" tag for questions related to that product.

Visual Component Library is a visual component-based object-oriented framework tightly integrated with Delphi and C++Builder. It's also available for Python as a GUI framework.

VCL components cover visual and non-visual components like:

  • Windows common controls
  • Database access components
  • Internet connection components

The component approach allows programmers to extend easily the VCL.

Resources:

1590 questions
9
votes
2 answers

Remove empty strings from TStringList

Is there any build-in function in Delphi to remove all strings from a TStringList which are empty? How to loop through the list to remove these items?
Franz
  • 1,883
  • 26
  • 47
9
votes
1 answer

Custom background color in Delphi with runtime themes enabled

I'm creating a bunch of Panels on runtime and I want to change their color. Color property doesn't work and I don't want turn of runtime themes. I'm using Delphi XE3.
David Novák
  • 103
  • 4
9
votes
2 answers

How do you line up a TPopupMenu so that it accurately positions itself above a button?

I want a popup menu above a button: Delphi wraps the Win32 menu system in a way that seems to preclude every mode or flag that the underlying Win32 API provides that was not in the VCL author's brain on that day. One such example appears to be the…
Warren P
  • 65,725
  • 40
  • 181
  • 316
9
votes
3 answers

Why does a MessageBox not block the Application on a synchronized thread?

As far as I understand and know the method of the TThread Class, if you synchronize your code, it actually get's executed in the main Application Thread (just like a timer/buttonclick/etc.) I've been playing around and noticed that a MessageBox DOES…
Ben
  • 3,380
  • 2
  • 44
  • 98
9
votes
2 answers

Why is there no Description property yet on the TService?

It's always been strange that there's never been a Description property on the TService in Delphi's VCL. Even to this day, Delphi XE2 doesn't have it yet. It's such a simple and common thing, that I'm wondering why it's not there. I know how to…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
9
votes
1 answer

Conditionally compile units for FMX or VCL

I want to have a different list of units in the uses clause depending on compiling for FMX or VCL. In the code below I try to test FireMonkeyVersion which works in an FMX project (label1.Text is 'FMX'). When I move the $IF statement into the uses…
Arnold
  • 4,578
  • 6
  • 52
  • 91
9
votes
3 answers

How to recompile a specific unit from the VCL?

I want to apply a fix from QC to a Delphi 2009 unit (DBClient as it happens). I know I need to copy the unit to another directory and make the change to the copy. How do I then get Delphi to compile that unit and use it in favour of the DCU that…
Rob McDonell
  • 1,309
  • 9
  • 15
8
votes
3 answers

In TButtonGroup.ButtonOptions what does adding gboGroupStyle do?

The help indicates that adding gboGroupStyle to the ButtonOptions on a TButtonGroup: "Specifies that the buttons should inherit the group style that is set on the container." But this explanation still leaves me lost - any ideas?
Alister
  • 6,527
  • 4
  • 46
  • 70
8
votes
2 answers

Hide the Main Form in a Delphi 2009 Application

The following code works fine in Delphi 7. However, in Delphi 2009 the form does remain hidden but the button on the taskbar is now appearing. ShowWindow(Handle, SW_HIDE); SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or…
James
  • 80,725
  • 18
  • 167
  • 237
8
votes
4 answers

Windows 7 integration with Delphi

I need components to integrate my app to Windows 7. I'm talking about the taskbar's ability to have progressbar, buttons, text and so on. What is the best you know?
John White
  • 393
  • 2
  • 4
  • 7
8
votes
1 answer

TEdit and WM_PAINT message handler strange behavior

I am trying to implement my own drawing on a TEdit control when it does not have focus (show ellipsis in TEdit when the editor doesn’t fully display its text). So I starאed with this code: type TEdit = class(StdCtrls.TEdit) private …
zig
  • 4,524
  • 1
  • 24
  • 68
8
votes
2 answers

How can I reduce PageControl flicker in Delphi?

In Delphi 2009 I found that the flicker of a PageControl - which occurs during resizing of the form - can be reduced by setting its DoubleBuffered property to true. However if I add controls to the PageControl tabsheets, they will flicker regardless…
mjn
  • 36,362
  • 28
  • 176
  • 378
8
votes
1 answer

how to sort in Tlistview based on subitem[x]

How to sort in tlistview with data present in subitem[x]?
steve0
  • 721
  • 3
  • 11
  • 19
8
votes
2 answers

How to break up TPageControl tabs into seperate files in Delphi?

I have a VCL form with a five tab TPageControl on it. Each TTabSheet's content is fairly unrelated and has a lot of individual controls and processing logic...so I want to break it up so it's easier to deal with the code for "just that tab". Having…
Jessica Brown
  • 8,222
  • 7
  • 46
  • 82
8
votes
2 answers

Pass parameter when creating a new form in delphi SDI

Ok, I'm sorry if this is a little bit confusing but I don't know how to explain it better. I have a chat form that is shown after the user has previously authenticated in TLoginForm. User logged in then show the chatForm: with…
Eduard
  • 3,395
  • 8
  • 37
  • 62