jvcllaz: Add new component TJvBehaviorLabel

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-07-28 16:56:07 +00:00
parent a67900a950
commit 447d867a99
13 changed files with 1911 additions and 1 deletions

View File

@ -25,6 +25,7 @@ tjvgroupheader_200.png
tjvrollout.png
tjvrollout_150.png
tjvrollout_200.png
tjvbehaviorlabel.bmp
tjvcombolistbox.bmp
tjvlookupautocomplete.bmp
tjvinstalllabel.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,97 @@
{-----------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: JvBandsReg.PAS, released on 2002-05-26.
The Initial Developer of the Original Code is John Doe.
Portions created by John Doe are Copyright (C) 2003 John Doe.
All Rights Reserved.
Contributor(s):
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
located at http://jvcl.delphi-jedi.org
Known Issues:
-----------------------------------------------------------------------------}
// $Id$
unit JvBehaviorLabelEditor;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils,
PropEdits;
// DesignEditors, DesignIntf;
type
TJvLabelBehaviorProperty = class(TStringProperty)
public
function AutoFill: Boolean; override;
procedure SetValue(const Value: string); override;
procedure GetValues(Proc: TGetStrProc); override;
function GetAttributes: TPropertyAttributes; override;
end;
implementation
uses
JvBehaviorLabel; //, JvDsgnTypes;
function TJvLabelBehaviorProperty.AutoFill: Boolean;
begin
Result := inherited AutoFill;
// if you want to fix the flickering when double-clicking a value, uncomment line below:
// Result := False;
end;
function TJvLabelBehaviorProperty.GetAttributes: TPropertyAttributes;
begin
Result := [paValueList, paRevertable, paMultiSelect];
end;
procedure TJvLabelBehaviorProperty.GetValues(Proc: TGetStrProc);
var
S: TStringList;
I: Integer;
begin
S := TStringList.Create;
try
GetRegisteredLabelBehaviorOptions(S);
S.Sort;
for I := 0 to S.Count -1 do
Proc(S[I]);
finally
S.Free;
end;
end;
procedure TJvLabelBehaviorProperty.SetValue(const Value: string);
{
var wp -- to do
List: IDesignerSelections;
LDesigner: IJvFormDesigner;
}
begin
inherited SetValue(Value);
{
List := CreateSelectionList;
Designer.GetSelections(List);
LDesigner := Designer; // keep Designer alive
LDesigner.SetSelections(nil);
LDesigner.SetSelections(List);
//Designer.Modified;
}
end;
end.

View File

@ -15,6 +15,7 @@ implementation
uses
Classes, Controls, ActnList, PropEdits, JvDsgnConsts,
JvBehaviorLabel, JvBehaviorLabelEditor,
JvMovableBevel, JvRuler, JvGroupHeader, JvRollOut,
JvHtControls, JvHint, JvHTHintForm, JvComboListBox, JvInstallLabel,
JvOfficeColorPanel,
@ -23,11 +24,13 @@ uses
procedure Register;
begin
RegisterComponents(RsPaletteJvclVisual, [
TJvBehaviorLabel,
TJvMovableBevel, TJvMovablePanel, TJvRuler, TJvGroupHeader, TJvRollOut,
TJvHint, TJvHTLabel, TJvHTListbox, TJvHTCombobox, TJvComboListBox,
TJvOfficeColorPanel,
TJvLookupAutoComplete, TJvInstallLabel
]);
RegisterPropertyEditor(TypeInfo(TJvLabelBehaviorName), TJvBehaviorLabel, 'Behavior', TJvLabelBehaviorProperty);
RegisterPropertyEditor(TypeInfo(TCaption), TJvHTLabel, 'Caption', TJvHintProperty);
RegisterActions(RsJVCLActionsCategory, [TJvRollOutAction], nil);
end;