vcl

TPanel does not AutoSize when containing a TPanel

冷暖自知 提交于 2019-12-07 04:56:32
问题 I have a panel inside another: The inner panel is aligned alTop : And the outer panel is set to AutoSize=true : And everything sizes. If i changes the height of the inner panel at design time, the outer panel auto sizes to accommodate it: And now runtime Now i need to change the height of the inner panel at runtime: procedure TForm2.Button1Click(Sender: TObject); begin pnlInner.Height := pnlInner.Height + 50; lblPointer.Top := pnlOuter.Top + pnlInner.Height; end; Except when i change the

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

泄露秘密 提交于 2019-12-07 03:13:27
问题 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 this: procedure TDbGridTestForm.mygridDrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if gdSelected in State then begin // mygrid.DrawCellHighlight(Rect, State, Col, Row); mygrid

Numeric edit control with flat button inside and no calculator

雨燕双飞 提交于 2019-12-06 22:38:29
I'm writing a C++ project with RAD Studio, but this also applies to Delphi. I need an edit control where user can only enter floats (2 decimal places) and can restore the original value (taken from a variable, not important here) clilcking on a button (actullay an icon) inside the edit control itself. This is what I've done, using a TJvCalcEdit from JEDI library. Control definition: object Sconto1: TJvCalcEdit [non-important attributes...] ButtonFlat = True Glyph.Data = { D6020000424DD6020000000000003600000028000000100000000E0000000100

How to set ExitCode in a VCL Forms Application

*爱你&永不变心* 提交于 2019-12-06 20:36:09
问题 I can't get ExitCode to work for a VCL forms application. Here is my test application. It was created from the File / New menu in the Delphi 2007 IDE. The only change is that I added the line ExitCode := 42; at the end. program Test; uses Forms, Unit27 in 'Unit27.pas' {Form27}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm27, Form27); Application.Run; ExitCode := 42; end. Now, when I run it from the command line, %ERRORLEVEL%

Linking fails [ilink32 Error] Fatal: Unable to open file 'TYPES.OBJ'

。_饼干妹妹 提交于 2019-12-06 16:29:35
问题 I have been updating code fomr an old legacy project build using C++ Builder 2010 to compile with C++ Builder 10 Seattle . I have mostly had to change paths, a lot of dupIgnore to TDuplicates::dupIgnore , reimport some components like MSXML and MSMQ etc. First for a bunch of subprojects that the main project uses in the form of bpl's and dll's and finally the code of the main project compiles. But... it fails a linking :P [ilink32 Error] Fatal: Unable to open file 'TYPES.OBJ' I have tried to

how to write a function Click() for dynamic created button?

旧街凉风 提交于 2019-12-06 15:18:39
问题 Trying to write a simple VCL program for educating purposes (dynamicly created forms, controls etc). Have such a sample code: void __fastcall TForm1::Button1Click(TObject *Sender) { TForm* formQuiz = new TForm(this); formQuiz->BorderIcons = TBorderIcons() << biSystemMenu >> biMinimize >> biMaximize; formQuiz->Position = TPosition::poDesktopCenter; formQuiz->Width = 250; formQuiz->Height = 250; formQuiz->Visible = true; TButton* btnDecToBin = new TButton(formQuiz); btnDecToBin->Parent =

VCL界面开发必备装备!DevExpress VCL v19.1.7你值得拥有

不打扰是莪最后的温柔 提交于 2019-12-06 10:13:53
DevExpress VCL Controls是 Devexpress公司旗下最老牌的用户界面套包。所包含的控件有:数据录入,图表,数据分析,导航,布局,网格,日程管理,样式,打印和工作流等,让您快速开发出完美、强大的VCL应用程序!DevExpress广泛应用于ECM企业内容管理、 成本管控、进程监督、生产调度,在企业/政务信息化管理中占据一席重要之地。 【适用范围】 :Delphi / C++Builder XE2 / XE3 / XE4 / XE5 / XE6 / XE7 / XE8 / XE10 , Embarcadero Delphi , C++Builder 10 Seattle DevExpress VCL Controls v19.1.7试用下载 具体更新内容如下: 解决的问题 此列表包括v19.1.7中已解决的所有问题。 ExpressBars Suite T823778 - Ribbon - Customization Form - 重新打开表单后,"Reset all customizations" 选项不会恢复功能区标签顺序 ExpressDocking Library T826051 - 对于Dock panels或扩展的docking管理器指定的较大字体,Dock panels不足以增加其标题 ExpressEditors Library T830738

How to suppress “There are still active COM objects in this application” error when closing application?

狂风中的少年 提交于 2019-12-06 09:50:39
问题 I've written a few ATL COM objects that are used for drag-and-drop within my C++ Builder application. Due to reasons beyond my control, my application still has active COM objects when the user attempts to close it. This is because other COM clients that use my objects seem to cache my COM objects and don't release them - as a result, my COM objects still have a reference count greater than zero when the user clicks the "X" to close my program. This results in the user getting an unfriendly

TMemo descendant with empty lines

北慕城南 提交于 2019-12-06 08:57:15
问题 My TMemo descendant has constructor constructor TMyMemo.Create(AOwner: TComponent); begin inherited Create(AOwner); Lines.Clear; end; When I put TMyMemo on the form I get error "Control '' has no parent window.". Why? 回答1: A newly created memo has no content. But content is added as soon as the component acquires a name, which is done automatically by the designer. To prevent this, remove csSetCaption from ControlStyle : constructor TMyMemo.Create(AOwner: TComponent); begin inherited Create

Easiest way to make a button with just a image

☆樱花仙子☆ 提交于 2019-12-06 07:31:05
问题 I'm using Delphi XE and I would like to make a button which shows just the provided PNG image with transparent background and no additional margins of any kind. I tried to do this with TButton but I get an ugly gray background with bsPushButton style. If I use bsCommandLink style there is a 10 pixel top margin although all my ImageMargins settings are set to 0. What would be the easiest way to make this happen? EDIT: It doesn't have to look like a button. I just need it to look exactly like