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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

C++Builder 64-bit Clang gives Unresolved external 'Vcl::Controls::TWinControl::GetDPIForDesigner()' for legacy forms

We're porting some projects from an older version of C++Builder (10.1 32-bit) to 11.0 64-bit. We created new, separate projects (all 141 of them!) and configured and added source to them. Just about ...
user2113260's user avatar
-1 votes
0 answers
95 views

Delphi TWinControl will not display the TLabel [closed]

The following TWinControl component will not display the 2 TLabels I have positioned at the top Here is part of the component code unit Payments; interface uses Winapi.Windows, ...
Niall Thoresen's user avatar
1 vote
0 answers
41 views

When controls that are placed on a TForm are initialized?

If VCL controls are used in the initialization list of the form's constructor, the compiler reports the warning: field 'ControlName' is uninitialized when used here Is this really the case or is the ...
Kerem's user avatar
  • 439
0 votes
2 answers
125 views

Delphi TWinControl duplicating its children at runtime

When I build this component and place it on a form, all appears fine. However, when I run the program, the control duplicates all of its children. It appears to be calling the initialize components ...
Niall Thoresen's user avatar
0 votes
1 answer
104 views

Problem with TWinControl component not responding to form resizing

I have a visual control written in Delphi 10.4. To make it simple to focus on the problem I created just the TwinControl with properties of Anchors and Align. I included the AutoSize property. The ...
Niall Thoresen's user avatar
0 votes
1 answer
194 views

Why is my custom control not receiving focus on its own?

I am working on a custom control, inherited from a TCustomControl. I am overriding a few events such as KeyDown so that I can capture keyboard and mouse input. However, for whatever reason it is not ...
Jerry Dodge's user avatar
  • 26.9k
0 votes
1 answer
178 views

Delphi 12 Athens Child Form Flickering

After updating to the new version of Delphi in RAD Studio 12 Athens, child VCL Forms are flickering in the Form activation event. Does any one knows the reason?
Masoud Mohammad Vali's user avatar
0 votes
0 answers
13 views

Find out TScrollBox contents height

Is there a standard way to find out contents height of a TScrollBox? By now I ended up with a following workaround: function ScrollBoxContentsHeight(AScrollBox: TScrollBox): Integer; var i, ...
Paul's user avatar
  • 25.9k
4 votes
1 answer
116 views

How can I update the tooltip text of a Windows trackbar control?

The TTrackBar component in Delphi is a wrapper around the standard Windows trackbar control. When the PositionToolTip property is not None a tooltip is displayed while dragging the thumb of the ...
blerontin's user avatar
  • 2,980
0 votes
0 answers
71 views

Custom drawn cells on TCalendarView vanish with mouse movements

I am trying to customize a TCalendarView on C++Builder 11 in the OnDrawDayItem event in order to draw some additional info into the cells in the future. This drawing itself works OK when the program ...
cppRookie's user avatar
-1 votes
1 answer
115 views

How does TComboBoxEx in VCL work to add images in it?

I'm trying to add images into a combobox instead of text. Someone recommended I use the TComboBoxEx instead of TComboBox, but how does it work? I found a tutorial, but it's confusing and I do not ...
Martin Kakhuis's user avatar
1 vote
1 answer
117 views

How can I add images into a TComboBox in VCL?

I'm trying to have a TComboBox with images instead of text. Is this possible? If yes, then how? I've looked over all of the properties a dozen times and I can't find anything. Also, I'm very new to ...
Martin Kakhuis's user avatar
0 votes
2 answers
147 views

How to get combobox and radio button ''out of focus''?

I'm trying to make an app which reads keys from the keyboard. When I press a key, the program adds it to an array and then I do what I want. I'm not writing in an Edit control. I'm directly pressing ...
Ineffable21's user avatar
0 votes
1 answer
61 views

OnReceiveLocalNotification works well initially, but is not fired once the notification goes into Windows Action Center

In have made a VCL application with Delphi 11.3. The OnReceiveLocalNotification event of TNotificationCenter works well (fires) if the user clicks my notification while it's initially visible (has ...
Matthias B's user avatar
0 votes
1 answer
61 views

How to store (stream) a TColor array property?

I'm writing a non-windowed VCL control that contains a TColor array property, called Colors[]. The Colors[] property can be used to set the color of different parts of the control at run-time. The ...
Martin Nijhoff's user avatar
0 votes
1 answer
80 views

Teechart VCl/Delphi : Use a second axis

I tried to use a teechart with a second axis but all the examples I found are not in Delphi. I even tried ChatGPT but the code is wrong. It suggests Chart1.VerticalAxis := aRightAxis; but Chart1 has ...
bicou's user avatar
  • 3
0 votes
1 answer
92 views

AddFontResource not working on my Win64 Delphi Application

My application is a VCL Win64 application built with Delphi 10.3.3. For some reason, AddFontResource() is not working properly on Windows 11. Here is what I have so far: procedure TfrmMenuPrincipal....
Leo Bruno's user avatar
  • 484
1 vote
0 answers
90 views

C++ Builder application crash in VCL before WinMain is called

I am lost in a debugging session, because I am not able to locate the root of an access violation exception on application startup. Is there any documentation on the VCL startup process/runtime? The ...
kvirk's user avatar
  • 127
3 votes
0 answers
130 views

Setting MainFormOnTaskBar Causing Issues with Modal Dialogs

I am working on Delphi 11.2 with an older Delphi project, pre Application.MainFormOnTaskBar's introduction, so by default it was set to False. I tried adding the following line to the project's .dpr ...
cab327's user avatar
  • 39
1 vote
1 answer
40 views

RAD Studio XE7 - VCL - TSpeedButton lost its background transparency when hovered on Windows 11

In one of my VCL applications I'm using TSpeedButton components as an highlight effect visible when the component is hovered. I reproduced below a minimal example showing how I use a such component. ...
Jean-Milost Reymond's user avatar
0 votes
0 answers
95 views

Sliding GroupBoxes

Windows 10. Delphi 11. VCL. This seems to me a standard Windows behaviour, but I am stumped how to do it. I have two GroupBoxes next to each other on a Form. I want to be able to hover the mouse over ...
Bart Kindt's user avatar
0 votes
1 answer
91 views

TTreeView: how to check/uncheck ONLY children from a TTreeNode?

Windows 10, Delphi 11. I want to set .Checked only for children of a single TTreeNode with checkboxes. This is the default behavior in TreeViews. But the following code also selects all siblings (on ...
Bart Kindt's user avatar
0 votes
1 answer
38 views

How to change the caption of a button, using DWScript

I want to interact with GUI elements, from within DWScript (created by Eric Grange). For example change the caption of a button from 'Click Me' to 'Clicked'; I think that within tdwsUnit the TButton ...
Rudolf's user avatar
  • 3
0 votes
1 answer
214 views

Confused on how to use 64-bit components installed for Delphi in C++Builder

I'm a bit confused on adding something called StyleControls for RAD Studio. I heard that if you install it on the Delphi version, you can also use it with C++Builder. So I compiled the source of ...
Merk don's user avatar
0 votes
1 answer
39 views

Closing a form that is minimized keeps the main form from accepting mouse/keyboard events

In C++Builder, I noticed that if I open a sub-form using ShowModal() (sub-form's PopupMode is pmAuto, and PopupParent is blank), and if I call Application->Minimize() then close the sub-form by ...
user3161924's user avatar
  • 1,897
0 votes
1 answer
34 views

C++Builder subform doesn't show on taskbar and minimize is placed on the desktop not the taskbar?

Using C++Builder and opening a vcl subform with ShowModal() results with no taskbar entry and minimize doesn't minimize to taskbar (it's placed in lower left of the desktop). Is there a setting I ...
user3161924's user avatar
  • 1,897
0 votes
1 answer
108 views

TComboBox dropdown list should be hidden when the parent content is scrolled

Take a TComboBox and put it on a TScrollBox. In the OnMouseWheel event of the TScrollBox, the position of the vertical scroll bar is adjusted as follows: void __fastcall TForm1::ScrollBox1MouseWheel(...
Kerem's user avatar
  • 439
1 vote
1 answer
129 views

How do I get rid of form flicker when FormStyle is bsNone in Delphi?

Even "DoubleBuffered" property is True, when I restore minimized form, my form flickers. But this issue occurs only if "BorderStyle" property is bsNone. Any type of "...
Çağatay KAYA's user avatar
0 votes
0 answers
129 views

Borderless form cannot be minimize by clicking on the taskbar application icon

I have a Delphi VCL application with the following settings: BorderIcons = [] BorderStyle = bsNone I have then already implemented various functions such as minimizing, closing, etc. via buttons. Now ...
Athris's user avatar
  • 57
0 votes
0 answers
61 views

C++ builder program using key-input when launching

I want to change program behavior whether optional key input is there or not.I wrote Form1 constructor like followings: bool controlled = false; __fastcall TForm1::TForm1(TComponent* Owner) : ...
nao's user avatar
  • 1
0 votes
1 answer
168 views

How to read value of TcxLookupComboBox when looping cxGrid?

I have cxGrid that has a column with TcxLookupComboBox type linked with DataSource I need to read the value of the TcxLookupComboBox fields of each row in the cxGrid I want a code of loop when I can ...
Houdhaifa's user avatar
1 vote
1 answer
153 views

How do I get a pointer to a property in Delphi?

I'd like a pointer to TEdit.Text, but no matter how I express it Delphi insists that E2036 Variable required.
denoyo9984's user avatar
0 votes
0 answers
119 views

TSpeedButton background transparency problems with TVirtualImageList

If I load a BMP image into a TSpeedButton.Glyph, its background will be transparent. If I use the same button and image via a TImageCollection + TVirtualImageList pair, the background will be opaque. ...
SOLID Developper's user avatar
0 votes
0 answers
38 views

How to create stacked bar chart in FastReport VCL from one dataset

I have dataset with fields «country», «year» and «value», and I want to build bar chart like on this picture:stacked bar chart example I can make chart like this in RadStudio for general VCL form as ...
vbif's user avatar
  • 67
2 votes
1 answer
63 views

How to add a border to TText or TLabel in FireMonkey?

I usually code using VCL in C++Builder, but now I'm using FireMonkey for a multi-platform project, and I have some difficulties. In VCL, it is easy to set a solid rectangular border for TStaticText by ...
steve.b's user avatar
  • 73
0 votes
1 answer
19 views

Is there a short one-line way to set the margins of a component in a Python VCL GUI App?

I know you can set each margin (Top, Right, Bottom, Left) individually like the following code: self.myPanel.AlignWithMargins = True self.myPanel.Margins.Top = 100 self.myPanel.Margins.Right = 100 ...
Shaun Roselt's user avatar
0 votes
0 answers
76 views

TImageList GetHandle Returning Integer Greater Than MaxInt

I am in the process of converting a Delphi XE8 project to Delphi 11.2. In the project, I am creating a TImageList at runtime, and loading in bitmaps from a .res file. When building and running this ...
cab327's user avatar
  • 39
-4 votes
1 answer
430 views

Delphi throwing error "undeclared identifier TForm", why? [closed]

I have been facing this error for like 30 mins and I can't find a solution. Can someone please help me? I tried to google for a solution, but I couldn't find one.
AckeeXZ's user avatar
  • 19
2 votes
1 answer
101 views

VCL App in C++ Builder and FormCreate Event Better Understanding

As someone new to VCL apps, my baseline understanding is that any code included in the FormCreate function will be executed when Form1 is generated and displayed. So, for example, I call a function ...
Skypilot65's user avatar
0 votes
1 answer
61 views

How to replace Bitmap.ClearRect from FMX replace on VCL?

I try to rewrite an FMX project in VCL. Code for QR-code drawing in FMX: for Column := 0 to QRCode.Columns - 1 do begin if QRCode.IsBlack[Row, Column] then QRCodeBitmap.ClearRect(TRectF.Create(...
W300I's user avatar
  • 11
0 votes
0 answers
63 views

Is it a TouchKeyboard bug in Delphi Alexandria 11.3?

I dropped a TouchKeyboard from palette into a form, and I ran the program. When I clicked with mouse on the left Shift (down&up) on TouchKeyboard, and then clicked the right Shift, everything ...
Branko Sretenovic's user avatar
1 vote
1 answer
93 views

Issue handling TComponent objects (TEdits, TLabels, ...) from a TForm object, saved in an unordered_map (member of my own class)

I'm trying to handle TComponent objects (TEdit, TLabel, ...) from my TForm object which are saved in an std::unordered_map. But something weird happens to the pair values when I try to handle them. ...
Loststar's user avatar
0 votes
1 answer
269 views

Delphi VCL Custom TCombobox Dropdown Width

I have a simple descendant of Delphi's VCL TCombobox for a very special customer showcase. It has only 2 features (separator lines, multi-line items) that I did not find on a ready-to-use component. ...
Mockminister's user avatar
0 votes
1 answer
65 views

TDBGrid - How do you HitTest if you are on the column headers?

I start a drag operation on a TDBGrid by doing: void __fastcall TMyForm::DBGrid1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y) { if (DragDetect(DBGrid1->Handle, Point(X,Y))) { ...
user3161924's user avatar
  • 1,897
0 votes
0 answers
138 views

TListView.BeginUpdate prevents hints from showing on UNRELATED controls

When hovering the mouse over a control that has a hint, that hint is shown (ShowHint is True). For some reason, TListView.BeginUpdate prevents the hint from being shown, even though the control has ...
hundreAd's user avatar
  • 158
0 votes
2 answers
62 views

Why Delphi Canvas.TextRect prints a String if I pass the value direct but not a String value coming from another class or database

Please help me to find out why the following codes doesn't work while the same code works if I pass the text as follows in Delphi 11.3 //Working var TextRect: TRect; var myText : String; myText := '...
mesutuk's user avatar
  • 402
3 votes
1 answer
90 views

How to prevent Embarcadero C++Builder changing the bitmap code within the DFM all the time?

I have to work with C++Builder. Depending on the mood, the IDE changes the hex-encoded bitmap property within the DFM file. Even if I have not changed anything within the GUI. I'm using GIT and all ...
powerpete's user avatar
  • 2,783
0 votes
1 answer
134 views

How do you securely clear a TEdit's text in C++Builder?

I need to securely clear a TEdit control that has sensitive information so the process memory won't contain it (I'm not worried about the paging file at this time). I've tried directly accessing the ...
user3161924's user avatar
  • 1,897
0 votes
1 answer
109 views

How to make a form independent to another form?

I have a VCL application with a small form class. It's just a normal form with below FormCreate event. procedure TSmallForm.FormCreate(Sender: TObject); begin FormStyle := fsStayOnTop; self....
Fajela Tajkiya's user avatar
0 votes
0 answers
48 views

Add VCL and Forms support to Delphi Winapi message loop application?

I contribute code to a Delphi 7 application hosted on GitHub. While the application is in Delphi, it was written more like a Winapi application with its own Message Loop, etc. All forms are either ...
Tom Schaefer's user avatar

1
2 3 4 5
33