vcl

Delphi - Unit x was compiled with a different version of x, when fixing a VCL bug

删除回忆录丶 提交于 2019-12-10 19:04:51
问题 I am using Delphi XE6 and using Datasnap and JSON in my project. There is a bug I want to correct in the VCL unit System.JSON.pas (in the TJSONString.ToString function) where it should be escaping backslash characters as well as quotes. In order to fix this I carried out the following : Copied System.JSON.pas from the standard VCL source folder to my project source folder Added System.JSON.pas to my project (using the newly copied file) Fixed the bug and attempted to compile I get the error

Delphi 7 - how to use Inputbox

强颜欢笑 提交于 2019-12-10 18:05:55
问题 I am programming a program where you have to enter a password into a InputBox to gain access to the programs min features . But I have a problem if you click on cancel on the inputbox my program gives a error message . So i wanted to know if any one know how I can get that right because with the Messagedlg I know you use IF . But how can I get it right with a InputBox ? 回答1: InputBox() returns a blank string if the dialog is canceled, eg: var Pass: String; Pass := InputBox('Password needed',

how to dynamically create a component in delphi such as TLabel or TEdit …etc

馋奶兔 提交于 2019-12-10 13:29:19
问题 Using Delphi 2010 SQLQuery1.First; // move to the first record while(not SQLQuery1.EOF)do begin // do something with the current record // What's the code should i write in this part in order to create a TEdit // containing the user fullname the current item. ShowMessage(SQLQuery1['whom']); SQLQuery1.Next; // move to the next record end; 回答1: Well, to create a TEdit you need to do the following: Create a variable to work with. Either a local variable or a class member. Edit: TEdit; Then you

Custom component and tab order

喜欢而已 提交于 2019-12-10 12:50:08
问题 I have a custom component (inheriting from TCustomPanel ) that consists of two other components (let's say two edits). How do I get the tab order right when using the component? In the tab order designer I can only access the component itself which cannot have focus because it is a panel. What happens at runtime is that I can access the edits using the tab key, but only after the two buttons below the component got focused. How can I change the tab order in this situation? 回答1: The tab order

VCL篇:DevExpress v16.1新功能介绍

爱⌒轻易说出口 提交于 2019-12-10 11:28:51
PDF Viewer (CTP) DevExpress VCL v16.1将PDF Viewer控件加入Community Technology Preview (CTP),意味着可以直接在VCL应用中直接浏览PDF文件,无需额外安装PDF阅读器。 支持的功能有: 内容缩放和滚动 Side-by-side和连续页面布局 嵌入式字体 可以将任何页面导出为图片 可在设计时生成Ribbon/Toolbar UI Callout Popup Control VCL Callout Popup Control支持显示OS X/iOS样式的自定义弹出窗口,支持的功能有: 弹出动画效果 可选的圆角效果 可自定义弹出位置 Range Track Bar Editor v16.1新增一个全新的Range Track Bar Editor,一个可以选择区间值的进度条。这个编辑器可以用于两种类型的使 用场景:standalone (in unbound or data-aware mode) 和 inside container controls(比如Grid, TreeList, Pivot Grid 和 Vertical Grid控件)。 Grid Control Windows Explorer View Windows Explorer View 模仿了 Microsoft Windows

Delphi XE2 VCL styles, remove a style or disable a class skinning from a TLabel

孤者浪人 提交于 2019-12-10 09:41:20
问题 Using XE2 VCL styles, I'd like to disable the skinning for TLabel (or property sfTextLabelNormal) I've tried all kind of solutions from other questions, like using Engine.UnRegisterStyleHook, but it has no effect. 回答1: The TLabel component doesn't use styles hooks because is not a TWinControl descendant, so you can't use the UnRegisterStyleHook function. Instead you must override the Paint DoDrawText method. UPDATE Here you have a sample of how override the paint process of a TLabel. /

TeeChart Pro VCL/FMX教程(七):使用函数(一)

大城市里の小女人 提交于 2019-12-10 06:02:00
下载TeeChart Pro VCL/FMX最新版本 函数类型 函数特点 TeeChart Pro功能是一个系列,几乎可以是任何系列类型,应用代数函数,数据源是另一个图表系列。 所有函数都派生自TTeeFunction组件并继承TeeFunction的Period属性。 TeeChart Pro包含以下预定义功能列表。有关所有功能类型的完整列表,请参阅TeeChart Editor Gallery和Helpfile: 函数类别 导入数量 描述 Add 无限 绘制输入的总和 Average 无限 平均函数将计算每组Period点的平均值 Bollinger 1 布林线函数使用简单或指数移动平均线来构建布林线交易区间 Copy 1 输入系列的直接副本 Curve Fitting 1 使用TypeFitting公式通过数据输入绘制拟合多项式 Divide 无限 分割函数绘制输入按包含的降序划 Exponential Average 1 基于权重的指数平均值 Exponential Moving Average 1 基于权重的指数移动平均线 Exponential Trend 1 通过输入系列中的点绘制最佳指数趋势 High 无限 高功能绘制高输入点 Low 无限 低功能绘制低输入点 MACD 1 移动平均收敛分歧 Momentum 1

TeeChart Pro VCL/FMX教程(五):图例设计

非 Y 不嫁゛ 提交于 2019-12-10 05:49:02
下载TeeChart Pro VCL/FMX最新版本 图例控件 样式选项卡 可以通过图表编辑器,图表选项卡,图例页面访问图例参数。 图例样式 图例默认样式“自动”将在图表中只有一个系列时将系列点值放入图例中。当图表包含多个系列时,“自动”会将系列名称放入图例中。在编辑器中,使用Dropdown Combobox获取默认值以外的值。如果更改图例样式以显示值,并且图表中有多个系列,TeeChart Pro将显示第一个系列的值。您可以使用自定义选项修改显示。 Chart1.Legend.LegendStyle := lsLastValues; //Puts the last value of each Series in the Legend box 文本样式 有关可能的图例文本样式的列表,请参阅TextStyle属性。文本样式格式化图例中的系列条目(例如,将值显示为总计的百分比等)。 定位图例(位置选项卡选项) 对齐 使用对齐属性(顶部,底部,左侧和右侧)有4个可用的默认位置。右边是默认位置。图例的默认定位始终位于图表之外。有关定位图例的详细信息,请参阅有关自定义图例的部分。 调整图表 大小调整大小图表属性,如果未启用,将在图表框架区域内绘制图例。虽然这对于某些Legend定位要求可能是令人满意的,但是通过使用Legend

TeeChart Pro VCL/FMX教程(四):轴控制(下)

别来无恙 提交于 2019-12-10 05:37:54
下载TeeChart Pro VCL/FMX最新版本 附加轴 复制轴 TeeChart提供5个轴与数据系列相关联:Left、Top、Bottom、Right和Depth。向图表添加新系列时,您可以定义系列应与哪些轴相关(转到“选项卡”“General”页面)。您可以使用Axis Customdraw方法在图表上的任何位置重复4个前轴中的任何一个(或全部)。请注意,此方法会复制Axis,但不会添加新的自定义轴。 您将找到这个名为“CustAxisProject1”的示例,其中包含TeeChart示例代码: //fill the Series for this example with random data procedure TForm1.BitBtn1Click(Sender: TObject); Var t:integer; begin For t := 0 To 20 do Series1.AddXY(t, Random(100) - Random(70), '', clRed); end; //Put this code in the OnBeforeDrawValues() event: procedure TForm1.Series1BeforeDrawValues(Sender: TObject); var posaxis :Integer; begin With

TeeChart Pro VCL/FMX教程(六):使用系列(二)

岁酱吖の 提交于 2019-12-10 05:34:56
下载TeeChart Pro VCL/FMX最新版本 在图表上混合系列类型 TeeChart Pro 提供了一个空的Chart Canvas作为数据系列的背景。这意味着没有预定义图表类型。您可以将所需的图表类型定义为要显示的系列类型的混合。由于某些系列类型的特殊性质,在图表上混合使用一些系列类型是不切实际的。当您添加新系列时, TeeChart 会通过在图表库中显示不适合的系列类型来帮助您。您可以在一个图表中放置的系列数量没有实际限制。 添加新系列 使用图表编辑器(参见教程1)或按代码添加系列。 procedure TForm1.Button2Click(Sender: TObject); var tmpLineSeries:TLineSeries; begin tmpLineSeries:=TLineSeries.Create(self); Chart1.AddSeries(tmpLineSeries); tmpLineSeries.FillSampleValues(10); end; 选择系列的轴 添加到图表中的系列将自动将左轴和下轴作为参考轴。您可以通过选择相关系列的“系列常规”页面来更改图表编辑器中的参考轴。有4个轴可供选择,Top,Left,Bottom和Right。通过代码,更改轴将如下所示: With Series1 do begin HorizAxis :=