You've already forked lina-components
mirror of
https://bitbucket.org/Dennis07/lina-components.git
synced 2025-08-24 21:49:04 +02:00
Version 1.0 DEV 1.11a
Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
14
Example/TContextMenu/pExample.dpr
Normal file
14
Example/TContextMenu/pExample.dpr
Normal file
@@ -0,0 +1,14 @@
|
||||
program pExample;
|
||||
|
||||
uses
|
||||
Vcl.Forms,
|
||||
uMain in 'uMain.pas' {fmMain};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.MainFormOnTaskbar := True;
|
||||
Application.CreateForm(TfmMain, fmMain);
|
||||
Application.Run;
|
||||
end.
|
170
Example/TContextMenu/pExample.dproj
Normal file
170
Example/TContextMenu/pExample.dproj
Normal file
@@ -0,0 +1,170 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{B2F1BE7E-2745-4B2F-A4DE-CA83E5CC75C5}</ProjectGuid>
|
||||
<ProjectVersion>15.3</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<MainSource>pExample.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<DCC_UsePackage>JvBDE;JvGlobus;O408br;JvMM;JvManagedThreads;FireDACSqliteDriver;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;VampyreImagingPackage.D2009;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;frx19;inetdbbde;vclib;DBXInterBaseDriver;GR32_DSGN_RSXE5;DataSnapCommon;MiscrosoftScriptControls;pkCindyDERDXE5;JvNet;JvDotNetCtrls;DbxCommonDriver;vclimg;dbxcds;PieLib;vclshlctrls;MetropolisUILiveTile;JvXPCtrls;pkCindyPackDXE5;vcldb;vcldsnap;pkCindyIEDXE5;fmxFireDAC;pkCindyDBXDXE5;CustomIPTransport;JvCore;SynEdit_RXE5;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DebenuPDFLibraryLite;DCEF_XE5;CodeSiteExpressPkg;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;frxe19;JclDeveloperTools;JvDocking;adortl;JvWizards;frxDB19;FireDACASADriver;JvHMI;bindcompfmx;JvBands;vcldbx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;JvSystem;xmlrtl;svnui;ibxpress;SVATimer_DXE5;JvControls;JvTimeFramework;IndyProtocols;DBXMySQLDriver;djsonrt;FireDACCommonDriver;O408_r;bindengine;vclactnband;soaprtl;bindcompdbx;TeeUI;FMXTee;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;pkCindyDBCtrlsPackDXE5;FireDACADSDriver;vcltouch;LINA_D_XE5;VclSmp;FireDAC;VCLRESTComponents;Intraweb;GR32_RSXE5;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;vclx;svn;fmxdae;RESTComponents;bdertl;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>O408br;FireDACSqliteDriver;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;IndySystem;vclib;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;vclimg;dbxcds;vclshlctrls;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;CustomIPTransport;SynEdit_RXE5;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;IndyIPCommon;CloudService;FireDACIBDriver;inetdbxpress;webdsnap;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;vclFireDAC;xmlrtl;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;O408_r;bindengine;vclactnband;soaprtl;bindcompdbx;bindcompvcl;vclie;FireDACADSDriver;vcltouch;LINA_D_XE5;VclSmp;FireDAC;VCLRESTComponents;Intraweb;dsnapcon;inet;fmxobj;FireDACMySQLDriver;vclx;fmxdae;RESTComponents;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="uMain.pas">
|
||||
<Form>fmMain</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1031</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
<VersionInfoKeys Name="CFBundleName"/>
|
||||
<VersionInfoKeys Name="CFBundleDisplayName"/>
|
||||
<VersionInfoKeys Name="UIDeviceFamily"/>
|
||||
<VersionInfoKeys Name="CFBundleIdentifier"/>
|
||||
<VersionInfoKeys Name="CFBundleVersion"/>
|
||||
<VersionInfoKeys Name="CFBundlePackageType"/>
|
||||
<VersionInfoKeys Name="CFBundleSignature"/>
|
||||
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
|
||||
<VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
|
||||
<VersionInfoKeys Name="CFBundleExecutable"/>
|
||||
<VersionInfoKeys Name="CFBundleResourceSpecification"/>
|
||||
<VersionInfoKeys Name="LSRequiresIPhoneOS"/>
|
||||
<VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
|
||||
<VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
|
||||
<VersionInfoKeys Name="package"/>
|
||||
<VersionInfoKeys Name="label"/>
|
||||
<VersionInfoKeys Name="versionCode"/>
|
||||
<VersionInfoKeys Name="versionName"/>
|
||||
<VersionInfoKeys Name="persistent"/>
|
||||
<VersionInfoKeys Name="restoreAnyVersion"/>
|
||||
<VersionInfoKeys Name="installLocation"/>
|
||||
<VersionInfoKeys Name="largeHeap"/>
|
||||
<VersionInfoKeys Name="theme"/>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">pExample.dpr</Source>
|
||||
</Source>
|
||||
</Delphi.Personality>
|
||||
<Deployment/>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
40
Example/TContextMenu/pExample.dproj.local
Normal file
40
Example/TContextMenu/pExample.dproj.local
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<Transactions>
|
||||
<Transaction>1899.12.30 00:00:00.000.505,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.256,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.629,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.228,C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Example\TContextMenu\uMain.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.012,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.689,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.028,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.029,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.120,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.376,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.177,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.086,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.333,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.283,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.165,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.044,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.106,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.129,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.726,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.911,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.779,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.957,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.228,C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.dfm=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Example\TContextMenu\uMain.dfm</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.191,C:\Users\Dennis G\Documents\RAD Studio\Projekte\Project1.dproj=C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Example\TContextMenu\pExample.dproj</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.169,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.438,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.832,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.634,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.356,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.562,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.215,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.579,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.963,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.036,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
<Transaction>1899.12.30 00:00:00.000.541,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
|
||||
</Transactions>
|
||||
</BorlandProject>
|
BIN
Example/TContextMenu/pExample.exe
Normal file
BIN
Example/TContextMenu/pExample.exe
Normal file
Binary file not shown.
BIN
Example/TContextMenu/pExample.identcache
Normal file
BIN
Example/TContextMenu/pExample.identcache
Normal file
Binary file not shown.
BIN
Example/TContextMenu/pExample.res
Normal file
BIN
Example/TContextMenu/pExample.res
Normal file
Binary file not shown.
127
Example/TContextMenu/uMain.dfm
Normal file
127
Example/TContextMenu/uMain.dfm
Normal file
@@ -0,0 +1,127 @@
|
||||
object fmMain: TfmMain
|
||||
Left = 0
|
||||
Top = 0
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'LinaComponents "TContextMenu" Example'
|
||||
ClientHeight = 259
|
||||
ClientWidth = 449
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object pnButtons: TPanel
|
||||
Left = 0
|
||||
Top = 218
|
||||
Width = 449
|
||||
Height = 41
|
||||
Align = alBottom
|
||||
TabOrder = 0
|
||||
object btClose: TButton
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Close'
|
||||
TabOrder = 0
|
||||
OnClick = btCloseClick
|
||||
end
|
||||
object btApply: TButton
|
||||
Left = 364
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Apply'
|
||||
TabOrder = 2
|
||||
OnClick = btApplyClick
|
||||
end
|
||||
object btRefresh: TButton
|
||||
Left = 283
|
||||
Top = 8
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Refresh'
|
||||
TabOrder = 1
|
||||
OnClick = btRefreshClick
|
||||
end
|
||||
end
|
||||
object gbMenuItems: TGroupBox
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 433
|
||||
Height = 204
|
||||
Caption = 'Context menu items for *.pas files'
|
||||
TabOrder = 1
|
||||
object lwMenuItems: TListView
|
||||
Left = 16
|
||||
Top = 24
|
||||
Width = 401
|
||||
Height = 169
|
||||
Columns = <
|
||||
item
|
||||
Caption = 'Name'
|
||||
end
|
||||
item
|
||||
Caption = 'Caption'
|
||||
end
|
||||
item
|
||||
Caption = 'Command'
|
||||
end
|
||||
item
|
||||
Caption = 'Icon'
|
||||
end>
|
||||
RowSelect = True
|
||||
PopupMenu = pmMenuItems
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnChange = lwMenuItemsChange
|
||||
end
|
||||
end
|
||||
object ContextMenu: TContextMenu
|
||||
Items = <>
|
||||
Ext = 'pas'
|
||||
Left = 48
|
||||
Top = 40
|
||||
end
|
||||
object pmMenuItems: TPopupMenu
|
||||
OnPopup = pmMenuItemsPopup
|
||||
Left = 120
|
||||
Top = 40
|
||||
object miAdd: TMenuItem
|
||||
Caption = 'Add'
|
||||
OnClick = miAddClick
|
||||
end
|
||||
object miDelete: TMenuItem
|
||||
Caption = 'Delete'
|
||||
OnClick = miDeleteClick
|
||||
end
|
||||
object miSeparator: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object miEditCaption: TMenuItem
|
||||
Caption = 'Caption...'
|
||||
OnClick = miEditCaptionClick
|
||||
end
|
||||
object miEditCommand: TMenuItem
|
||||
Caption = 'Command...'
|
||||
OnClick = miEditCommandClick
|
||||
end
|
||||
object miEditIcon: TMenuItem
|
||||
Caption = 'Icon...'
|
||||
OnClick = miEditIconClick
|
||||
end
|
||||
end
|
||||
object odIcon: TOpenDialog
|
||||
Filter = 'Icons (*.ico)|*.ico|Executables (*.exe)|*.exe'
|
||||
Options = [ofReadOnly, ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofNoTestFileCreate, ofNoNetworkButton, ofNoDereferenceLinks, ofEnableSizing, ofDontAddToRecent]
|
||||
Left = 184
|
||||
Top = 40
|
||||
end
|
||||
end
|
179
Example/TContextMenu/uMain.pas
Normal file
179
Example/TContextMenu/uMain.pas
Normal file
@@ -0,0 +1,179 @@
|
||||
unit uMain;
|
||||
|
||||
{$IF CompilerVersion <> 26.0}
|
||||
{$MESSAGE ERROR 'This example was written to compile under Delphi XE5'}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.ComCtrls, Vcl.StdCtrls,
|
||||
uBase, uFileCtrls, Vcl.Menus;
|
||||
|
||||
type
|
||||
TfmMain = class(TForm)
|
||||
pnButtons: TPanel;
|
||||
btClose: TButton;
|
||||
btApply: TButton;
|
||||
gbMenuItems: TGroupBox;
|
||||
lwMenuItems: TListView;
|
||||
ContextMenu: TContextMenu;
|
||||
btRefresh: TButton;
|
||||
pmMenuItems: TPopupMenu;
|
||||
miAdd: TMenuItem;
|
||||
miDelete: TMenuItem;
|
||||
miSeparator: TMenuItem;
|
||||
miEditCaption: TMenuItem;
|
||||
miEditCommand: TMenuItem;
|
||||
miEditIcon: TMenuItem;
|
||||
odIcon: TOpenDialog;
|
||||
procedure btCloseClick(Sender: TObject);
|
||||
procedure btRefreshClick(Sender: TObject);
|
||||
procedure btApplyClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure pmMenuItemsPopup(Sender: TObject);
|
||||
procedure miAddClick(Sender: TObject);
|
||||
procedure miDeleteClick(Sender: TObject);
|
||||
procedure miEditCaptionClick(Sender: TObject);
|
||||
procedure miEditIconClick(Sender: TObject);
|
||||
procedure miEditCommandClick(Sender: TObject);
|
||||
procedure lwMenuItemsChange(Sender: TObject; Item: TListItem;
|
||||
Change: TItemChange);
|
||||
private
|
||||
{ Private-Deklarationen }
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
end;
|
||||
|
||||
var
|
||||
fmMain: TfmMain;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfmMain.btApplyClick(Sender: TObject);
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
ContextMenu.Items.Clear;
|
||||
for Index := 0 to lwMenuItems.Items.Count - 1 do
|
||||
begin
|
||||
with (ContextMenu.Items.Add as TContextMenuItem) do
|
||||
begin
|
||||
Name := lwMenuItems.Items.Item[Index].Caption;
|
||||
Caption := lwMenuItems.Items.Item[Index].SubItems.Strings[0];
|
||||
Command := lwMenuItems.Items.Item[Index].SubItems.Strings[1];
|
||||
Icon := lwMenuItems.Items.Item[Index].SubItems.Strings[2];
|
||||
end;
|
||||
end;
|
||||
ContextMenu.SaveToRegistry;
|
||||
btApply.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfmMain.btCloseClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TfmMain.btRefreshClick(Sender: TObject);
|
||||
var
|
||||
Index: Integer;
|
||||
begin
|
||||
ContextMenu.LoadFromRegistry;
|
||||
lwMenuItems.Items.Clear;
|
||||
for Index := 0 to ContextMenu.Items.Count - 1 do
|
||||
begin
|
||||
with lwMenuItems.Items.Add do
|
||||
begin
|
||||
Caption := (ContextMenu.Items.Items[Index] as TContextMenuItem).Name;
|
||||
SubItems.Add((ContextMenu.Items.Items[Index] as TContextMenuItem).Caption);
|
||||
SubItems.Add((ContextMenu.Items.Items[Index] as TContextMenuItem).Command);
|
||||
SubItems.Add((ContextMenu.Items.Items[Index] as TContextMenuItem).Icon);
|
||||
end;
|
||||
end;
|
||||
btApply.Enabled := False;
|
||||
end;
|
||||
|
||||
procedure TfmMain.FormCreate(Sender: TObject);
|
||||
var
|
||||
Index: 0..3;
|
||||
begin
|
||||
for Index := 0 to 3 do
|
||||
begin
|
||||
lwMenuItems.Column[Index].Width := (lwMenuItems.ClientWidth - GetSystemMetrics(SM_CXVSCROLL)) div 4;
|
||||
lwMenuItems.Column[Index].MinWidth := lwMenuItems.Column[Index].Width;
|
||||
lwMenuItems.Column[Index].MaxWidth := lwMenuItems.Column[Index].Width;
|
||||
end;
|
||||
btRefresh.Click;
|
||||
end;
|
||||
|
||||
procedure TfmMain.lwMenuItemsChange(Sender: TObject; Item: TListItem;
|
||||
Change: TItemChange);
|
||||
begin
|
||||
btApply.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TfmMain.miAddClick(Sender: TObject);
|
||||
begin
|
||||
with lwMenuItems.Items.Add do
|
||||
begin
|
||||
Caption := 'Item' + IntToStr(lwMenuItems.Items.Count);
|
||||
SubItems.Add('');
|
||||
SubItems.Add('');
|
||||
SubItems.Add('');
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.miDeleteClick(Sender: TObject);
|
||||
begin
|
||||
lwMenuItems.Items.Delete(lwMenuItems.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TfmMain.miEditCaptionClick(Sender: TObject);
|
||||
var
|
||||
NewCaption: String;
|
||||
begin
|
||||
NewCaption := lwMenuItems.Items.Item[lwMenuItems.ItemIndex].SubItems.Strings[0];
|
||||
if InputQuery('Edit item caption','Caption:',NewCaption) then
|
||||
begin
|
||||
if Length(NewCaption) > 0 then
|
||||
begin
|
||||
lwMenuItems.Items.Item[lwMenuItems.ItemIndex].SubItems.Strings[0] := NewCaption;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.miEditCommandClick(Sender: TObject);
|
||||
var
|
||||
NewCommand: String;
|
||||
begin
|
||||
NewCommand := lwMenuItems.Items.Item[lwMenuItems.ItemIndex].SubItems.Strings[1];
|
||||
if InputQuery('Edit item command','Command:',NewCommand) then
|
||||
begin
|
||||
if Length(NewCommand) > 0 then
|
||||
begin
|
||||
lwMenuItems.Items.Item[lwMenuItems.ItemIndex].SubItems.Strings[1] := NewCommand;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.miEditIconClick(Sender: TObject);
|
||||
begin
|
||||
odIcon.FileName := lwMenuItems.Items.Item[lwMenuItems.ItemIndex].SubItems.Strings[2];
|
||||
if odIcon.Execute = True then
|
||||
begin
|
||||
lwMenuItems.Items.Item[lwMenuItems.ItemIndex].SubItems.Strings[2] := odIcon.FileName;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfmMain.pmMenuItemsPopup(Sender: TObject);
|
||||
begin
|
||||
miDelete.Enabled := (lwMenuItems.ItemIndex > -1);
|
||||
miEditCaption.Enabled := (lwMenuItems.ItemIndex > -1);
|
||||
miEditCommand.Enabled := (lwMenuItems.ItemIndex > -1);
|
||||
miEditIcon.Enabled := (lwMenuItems.ItemIndex > -1);
|
||||
end;
|
||||
|
||||
end.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -24,6 +24,11 @@ type
|
||||
EInvalidExt = class(Exception);
|
||||
EInvalidAlias = class(Exception);
|
||||
|
||||
type
|
||||
{ Ereignisse }
|
||||
TContextCreateItemEvent = procedure(Sender: TObject) of object;
|
||||
TContextCreateEntryEvent = procedure(Sender: TObject) of object;
|
||||
|
||||
type
|
||||
{ Hauptklassen }
|
||||
TContextMenuItem = class(TCollectionItem)
|
||||
@@ -58,6 +63,9 @@ type
|
||||
FExt: ShortString;
|
||||
FAutoLoad: Boolean;
|
||||
FAlias: ShortString;
|
||||
{ Ereignisse }
|
||||
FCreateItemEvent: TContextCreateItemEvent;
|
||||
FCreateEntryEvent: TContextCreateEntryEvent;
|
||||
{ Methoden }
|
||||
procedure SetExt(Value: ShortString);
|
||||
procedure SetAutoLoad(Value: Boolean);
|
||||
@@ -83,6 +91,9 @@ type
|
||||
property Ext: ShortString read FExt write SetExt;
|
||||
property AutoLoad: Boolean read FAutoLoad write SetAutoLoad default False;
|
||||
property Alias: ShortString read FAlias write SetAlias;
|
||||
{ Ereignisse }
|
||||
property OnCreateItem: TContextCreateItemEvent read FCreateItemEvent write FCreateItemEvent;
|
||||
property OnCreateEntry: TContextCreateEntryEvent read FCreateEntryEvent write FCreateEntryEvent;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
@@ -153,7 +164,7 @@ end;
|
||||
|
||||
procedure TContextMenuItem.SetIcon(Value: TFileName);
|
||||
begin
|
||||
if (FileExists(Value) = True) then
|
||||
if (FileExists(Value) = True) or (Length(Value) = 0) then
|
||||
begin
|
||||
FIcon := Value;
|
||||
end else
|
||||
@@ -254,6 +265,10 @@ begin
|
||||
Command := ACommand;
|
||||
Icon := AIcon;
|
||||
end;
|
||||
if Assigned(OnCreateItem) then
|
||||
begin
|
||||
OnCreateItem(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TContextMenu.CreateRegistryEntry(var ARegistry: TRegistry;
|
||||
@@ -273,6 +288,10 @@ begin
|
||||
WriteString('',ACommand);
|
||||
CloseKey;
|
||||
end;
|
||||
if Assigned(OnCreateEntry) then
|
||||
begin
|
||||
OnCreateEntry(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TContextMenu.LoadFromRegistry;
|
||||
|
Reference in New Issue
Block a user