|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder Components » View Thread|
|Messages 1 to 8 of 8 total|
|Thu, Oct 27 2016 9:15 AM||Permanent Link|
My FormList component is a component, that operates as a list, and displays a form as the item. This allows you to have a complex graphical display in the list.
It isn't a beautiful thing though, partly because I hacked the default list just enough to make it work, and partly because of the inherent complexity. And partly because there are things that I haven't work out how to finish yet. Feel free to improve and post updates.
First, add a component to the pallete for the TFormList. Then open the project.
The key is to follow the template of the sample. The main form has a TFormList, and there are two events you need to have. One creates the form that will be the child for that item, and the other is for mouse-over support.
The child form is best if it derives from the TfrmListSubFormIntermediate but does not have to. Not sure why you wouldn't really. The key is that it has a MessageHandler which is passed an object. This is the object that it is being asked to represent in the list, or nil if there is nothing to show (scrolled up).
The mouse movement is slightly complex too, but basically uses the MouseMove to tell the parent class which knows about the FormList which then tells each other item to clear itself.
You can have a set number of items on the last page of the list, with the LastPageExtra property. I haven't worked out how to make this fit all in...
So, not a drop in and go component, but it works.
|Tue, Nov 1 2016 3:15 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
Nice, thank you for sharing that.
|Mon, Nov 7 2016 8:14 AM||Permanent Link|
Matthew Jones wrote:
I just realised that this contains code that supports my TreeList component too, so there may be some things not obvious, but that needn't matter really. When I'm done, I might give the tree list part too, but it is a big specific at the moment. I have to have multiple root nodes, searching, and all sorts.
|Tue, May 1 2018 8:36 AM||Permanent Link|
I know that this thread is about 2 years old, but your component would do exactly what I need - ok, almost, I am dreaming of a databound vertical panelized grid with all bells and whistles, like what you see in the gmail app Unfortunately, there is a unit missing in the FormList zip file. Could you add the uFilterableItem files?
|Tue, May 1 2018 8:46 AM||Permanent Link|
uses WebCore, uDeletableItem;
TFilterableItem = class (TDeletableItem)
function IsFilteredOut : Boolean; virtual;
function GetCanDisplay: Boolean; virtual;
function TFilterableItem.IsFilteredOut : Boolean;
Result := False;
function TFilterableItem.GetCanDisplay: Boolean;
Result := true;
|Tue, May 1 2018 8:52 AM||Permanent Link|
Now EWB asks for uDeletableItem
|Tue, May 1 2018 8:56 AM||Permanent Link|
TDeletableItem = class(TPersistent)
m_nDeleteStatus : Integer;
m_tmDateTime : DateTime;
m_n_DebugIndex : Integer;
procedure SaveProperty(AWriter: TWriter; const AName: String); override;
procedure DeleteStatusChanged(nDeleteIndex : Integer); virtual;
constructor Create; override;
function IsDeleted : Boolean;
procedure DeleteItem(nDeleteIndex : Integer);
property _DebugIndex : Integer read m_n_DebugIndex write m_n_DebugIndex;
property DeleteStatus : Integer read m_nDeleteStatus write m_nDeleteStatus;
property DeletedTime : DateTime read m_tmDateTime write m_tmDateTime;
m_nDeleteStatus := 0;
DeletedTime := DateTime(0);
function TDeletableItem.IsDeleted : Boolean;
Result := DeleteStatus <> 0;
DeleteStatus := 0;
DeletedTime := DateTime(0);
procedure TDeletableItem.DeleteItem(nDeleteIndex : Integer);
DeleteStatus := nDeleteIndex;
DeletedTime := Now;
procedure TDeletableItem.SaveProperty(AWriter: TWriter; const AName: String);
if (AName <> 'deletedtime') or (m_nDeleteStatus <> 0) then
inherited SaveProperty(AWriter, AName);
procedure TDeletableItem.DeleteStatusChanged(nDeleteIndex : Integer);
|Tue, May 1 2018 8:57 AM||Permanent Link|
These are basic levels of hierarchical class - you could make them whatever you want really depending on your needs.
This web page was last updated on
Wednesday, March 29, 2023 at 10:59 PM
© 2023 Elevate Software, Inc. All Rights Reserved
Questions or comments ? E-mail us at email@example.com