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
7
votes
2 answers

How do I set my MainForm to be hidden when my program starts?

I am using the Borland c++ builder. I have an application where I want the main form to be hidden until a button is pressed on a different form. i have set the Visible value on the mainform to false, but it still shows up when i run the program.…
Ben313
  • 1,662
  • 3
  • 20
  • 32
7
votes
2 answers

Can I prevent XE8 from adding System.ImageList?

A Form in XE8 gets automatically the uses System.ImageList added. Like on the embarcadero site is said: System.ImageList contains the common for both FireMonkey and VCL code implementing the most basic device-independent features of image lists.…
davepaul12
  • 391
  • 4
  • 15
7
votes
2 answers

Exclude VCL Styles from styling Dialog / ShowMessage borders

Is there any way to exclude VCL Styles from styling a system dialogs' border. Sepecifically a dialog that is shown by calling MessageDlg or ShowMessage. I read some articles on "The Road To Delphi" (which is an excellent site btw) but couldn't find…
ChrisB
  • 2,497
  • 2
  • 24
  • 43
7
votes
2 answers

VCL Style from DLL is affecting TMenuItem in Application

I am using Delphi XE6 and VCL styles. I have main application and dlls. My main application has enabled runtime themes and I am using vcl style files. I did quite similar thing to my DLLs. I enabled runtime themes and added VCL.Themes, VCL.Styles…
Nix
  • 581
  • 5
  • 20
7
votes
2 answers

How do I draw an image with an alpha channel to a TSpeedButton?

I've got a TSpeedButton, and a TImageList that holds various glyphs. One of them has an alpha channel, and it looks very nice when drawn to certain parts of the UI... but when that glyph is drawn on a TSpeedButton, it doesn't take the alpha channel…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
7
votes
1 answer

TListView SelCount reporting the wrong number of items in a virtual list

I need to enable or disable a button depending on whether at least a row is selected in the list or not. Below is the code to reproduce this issue. The list is populated using the OnData event and it allows multiple rows to be selected. I thought…
boggy
  • 3,674
  • 3
  • 33
  • 56
7
votes
4 answers

Compile Delphi component package (bpl) for different Delphi versions

The situation is the following. Typically I use RAD Studio 2010 for Delphi development. I have some components I would like to redistribute in binary form (*.bpl without source). But I would like people to be able to use them despite of their Delphi…
Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156
7
votes
2 answers

How to implement find as you type on a TComboBox descendant

What is the correct way to implement the "find as you type" behavior on a TComboBox descendant component whose style is csOwnerDrawFixed?
user16120
  • 952
  • 1
  • 10
  • 16
7
votes
2 answers

TToolbar incompatible with TForm.DoubleBuffered?

I am using Delphi XE3. When I create a new VCL project and drop a TToolbar on it, everything works fine - except when I activate Form1.DoubleBuffered. From that moment on, drawing of the toolbar is broken - in designtime, it's either black,…
Imanuel
  • 3,596
  • 4
  • 24
  • 46
7
votes
2 answers

Detect when child control resizes?

Is there a way for a parent control to detect when a child control resizes? I'm considering writing a panel control that resizes as it's child controls resize (similar to the way a HTML DIV element will expand to fit it's contents).
Shannon Matthews
  • 9,649
  • 7
  • 44
  • 75
7
votes
1 answer

Styling only one VCL component in Delphi

I know, that it's possible to disable custom styling for components, but how can I enable styles for only one component class? For example leave the whole form and all components on it unskinned, and skin only TButton. Like on this image.
Zelenov
  • 953
  • 1
  • 9
  • 15
7
votes
3 answers

Remove and Replace a visual component at runtime

Is it possible to, for instance, replace and free a TEdit with a subclassed component instantiated (conditionally) at runtime? If so, how and when it should be done? I've tried to set the parent to nil and to call free() in the form constructor and…
user16120
  • 952
  • 1
  • 10
  • 16
7
votes
6 answers

Delphi: How to find and fix an EOutOfMemory Error?

I'm building a delphi application which does scientific simulation. It's growing in complexity & now consists of many units and forms. I'm starting to get EOutOFMemory Errors each time I run. It seems to happen during or just after I use an Array…
Hamish_Fernsby
  • 558
  • 1
  • 7
  • 28
6
votes
5 answers

How can I simulate the press of a button?

I want to test some forms. Is there a way to simulate the press of an Ok (or Cancel) button so that the button is pressed and fires the event handlers that are associated with it?
Arnold
  • 4,578
  • 6
  • 52
  • 91
6
votes
2 answers

How do I do a proper owner-draw of Full Row Selected TDBGrid when TDBGrid.DefaultDrawing is false?

When you have a TDBGrid, full row selection, and always show selection, even when not focused, and you want to fully owner-draw it, you have a choice of a deprecated event OnDrawDataCell , and a new event DrawColumnCell, I chose the latter and try…
Warren P
  • 65,725
  • 40
  • 181
  • 316