Website: https://andreamagni.eu
andrea-magni / tframestand Goto Github PK
View Code? Open in Web Editor NEWTFrameStand and TFormStand components for Delphi FireMonkey (FMX)
License: Mozilla Public License 2.0
TFrameStand and TFormStand components for Delphi FireMonkey (FMX)
License: Mozilla Public License 2.0
Website: https://andreamagni.eu
Howto implementation sheet expandable like this:
I would like to mimic Android dialogs with TFrameStand.
Is this possible to achieve this ? I have basic requirements, it would be :
What do you think ?
when using code injection or common actions the application stops working on Android 4.4.4 to 7.0.1.
works the first time. If it opens the frame a second time the app blocks.
Hi,
i have install the TFrameStand with open FrameStandPackage.dproj and click on compile and then install.
If i have set target system Win32 FrameStand Unit will be found and i can start the application.
If i set target system to android i get error that FrameStand unit not found, also TFrameStand ist not found and TFrameInfo.
How i can make FrameStand on Android available?
I think FrameStand does not allow any other animation in a frame to fire.
In particular, I am experiencing it with FMXLoading component.
When I put a loading image in a frame the animation does not work
Very poor documentation.
Hi,
I tried to install TFrameStand from the GetIt manager of a freshly installed RadStudio 10.3 Rio installation (using the C++Builder personality). However I cannot find the TFrameStand package...
Is that by by design (i.e. only Delphi Personality supported), was it removed from GetIt or am I simply too stupid to find it (search for TFrame yields no result with filter and categories both set to "all")?
Thanks!
(Sorry for the dummy question)
I have two frames:
Frame_1
Frame_2
In the Frame_1, I call (Frame_2). I need to go back to FRAME_1, but I need values from FRAME_2.
Somebody could to help me?
Hello,
I've tried to create a dynamic "wait frame" but it failed as soon as the frame is created.
It appears that TFrameStand parent can't be set to nil and must be a TFmxObject.
I've also tried to put my TFrameStand on a TDatamodule and set it's DefaultParent property to my main form. Frame were correctly created, displayed but there were a lot of memory leaks when closing my application (appears that all created frames were not correctly freed).
The only remaining solution is to put TFrameStand on a form.
Is there a way to change the GetDefaultParent method ? Is it possible to automatically set the DefaultParent with the 1st available visible form ? Right now, my "business" class does have the "form.main" unit and call my wait frame from here.... It will be better to separate my user interface unit from my business unit.
Best regards
Hi,
it would be nice to have 2 new events beforeHide and atferHide of framestand
thanks
I tried to compile your examples in berlin 10.1 and some my test projects with FrameStand and got some memory leaks like 1-12 bytes: TWinAcceleratorKeyRegistry, TAcceleratorKeyReceivers x 1 in PictureWallFrameStand and some overs. How to resolve this memory leaks?
Hello,
I have an Android project where I'm using frames instead of forms.
Structure is quite simple :
Only one frame can be visible at a time. All my frames does have OnkeyUp events declared. All frames are created with my maiin form as a parent.
How can I pass my main form keyevents to the current displayed frame ? I'm trying something like this...
procedure TfrmMain.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char;
Shift: TShiftState);
var
frm:TFrame;
begin
for frm in FrameStand1.FrameInfos.Keys.ToArray do
if frm.IsVisible then
begin
frm.OnKeyUp(Sender,Key,KeyChar,shift);
break;
end;
end;
But IsVisible is True for all my frame ! How to do it ?
Hi, this work for xe8 or just for seattle?
Hi!
in function TFrameInfo.Show can be useful to call application.processmessage if there's not a background task, just to "force" stand to be showed.
at the and , instead of
[cut] ).Start; end; end;you can write :
).Start;
end
else application.ProcessMessages ;
end;
It would be really useful if you could add attributes for BeforeHide and AfterHide as you have with BeforeShow and AfterShow on a frame
i have much of pleasure from TFrameStand, but last release carried some troubles.
i'm using such code:
FFrameStand.CommonActions.Add('Close*',
procedure (AInfo: TFrameInfo)
begin
AInfo.Hide(150,
procedure
begin
AInfo.Close();
AInfo:=nil;
end);
end
and i getting exception in doafterhide procedure, because frame has been already closed, when doafterhide procedure had been called.
What can i do to close frameinfo successfully ?
Sorry, my English is bad, mainly rely on Google translation.
TFrameStand v1.3
The problem is the same: #27
use BUTTON the main form loses focus and can not click on system buttons (minimize, maximize, close).
use TEXT or Image is OK.
The same code:
procedure TFrame1.Button1Click(Sender: TObject);
begin
FFrame1.Hide();
FFrame1.Close;
end;
procedure TFrame1.Text1Click(Sender: TObject);
begin
FFrame1.Hide();
FFrame1.Close;
end;
Hi,
Curious if you are interested to add this to Delphinus, too?
(OpenSource-Packagemanager for Delphi XE to Berlin)
https://github.com/Memnarch/Delphinus
EDIT: Sorry! Just noticed i had you contacted in the past about other repos! Didn't want to become anoying^^"
Hi Andrea
I was wondering if the latest commit should be in the GetIt package manager. Seems important.
Thanks .
Hi,
Wouldn't it be really great to have all the nice functions of the TFrameStand ... but using FORMS instead of frames ?
Would even be very happy to buy a commercial licence for such a component ;-)
kind regards
Hans
Hello,
I'm using to test the WAIT demo, to build and install the application on Android, to perform the rotation of the device the application closes.
I am using delphi Seattle and android 5.
I tested all demo and all closes when o perform the rotation of the device
Thanks
Marcio Eduardo
I had a need to use a TFormClass to instantiate a Form in TFormStand so I added a new method.
Return a TFormInfo is reasonable for me since my form implement an interface I used to communicate to them.
The reason I needed it is I have a set of Forms I register with my system at startup and I instantiate the form based upon user selection and I need to form(s) to go in the same container.
I basically have a TDictionary<String, TFormClass> I used to select from.
With this be something reasonable to add to TFormStand?
function TFormStand.New(const FormClass: TFormClass; const AParent: TFmxObject; const AStandStyleName: string): TFormInfo;
var
LForm: TForm;
LParent: TFmxObject;
LStandName: string;
begin
LParent := AParent;
if not Assigned(LParent) then
LParent := GetDefaultParent;
LStandName := AStandStyleName;
LForm := FormClass.Create(nil);
try
LForm.Name := '';
Result := Use(LForm, LParent, LStandName);
Result.FormIsOwned := True;
except
LForm.Free;
raise;
end;
end;
Hello,
I try to build "FrameStandPackage_10_3_260" but getting the error "[dcc32 Error] ResponsiveContainer.pas(30): E2010 Incompatible types: 'System.TArray<ResponsiveContainer.TBreakpoint>' and 'Set'"
I'm using Embarcadero® Delphi 10 Seattle Version 23.0.20618.2753
Can you help me?
Hi,
I tried your MaterialButtons demo, it's ok, but when I hide the buttons I receive this error "Argument out of range".
only in iOS and iOS emulator
regards
Antonello
When keyback hardware pressed top of frame close? how i can get top of frame and close it?
The OnShow animation I have is working, however when the FFrameInfo.Hide() is getting called within the frame, the frame disappears without any animation. Yes I have set up the animation the exact same way I did with the onshow. Minimal bug but still.
Great work by the way, loving it :)
hi .
in demo ViewAndDialogsStandframe .
update
function TMainForm.GetRatingDialogInfo: TFrameInfo;
begin
if not Assigned(FRatingDialogInfo) then
begin
FRatingDialogInfo := FrameStand1.New(ListView1);
FRatingDialogInfo.Frame.OnRatingChanged :=
procedure (ARating: Integer)
begin
ShowMessage('Rated: ' + ARating.ToString);
FRatingDialogInfo.Hide();
end;
FRatingDialogInfo.Frame.OnCancel :=
procedure
begin
//ShowMessage('Rating cancelled!');
// FRatingDialogInfo.Hide();
FRatingDialogInfo.Close(); //add
FRatingDialogInfo := nil ; //add
end;
end;
when click i'v got Access violation error !
i want to close and free FRatingDialogInfo
can you tell me the right way to close and free FRatingDialogInfo in OnCancel
thanks
Hi.
I opened the file "FrameStandPackage.dproj" and clicked install.
Then, when i run your examples it says file FrameStand listed in uses clause was not found...
I included it in environment and variable and could run it but it should not be done. What else i have to do to install this package?
Second, could you please include in your examples the complete example that is in http://www.andreamagni.eu/wp/2015/09/tframestand-component-fmx-tframes-on-steroids.
I am asking this cause there in ViewsAndDialogs demo, appear a new window with supposed pictures when "James Garcia" is selected.
In the demo you posted i only find the text descriptions... Not that frame that appears in your video demo.
Thanks.
I have some frames containing some editboxes and where the height (of the frame) is superior to the height of the mainform. It is usefull with mobile devices when the user change from a vertical to a horizontal layout.
To see the editboxes on the bottom of the form, I need a vertical scrollbar, using frames without a stand, I can achieve this with a vertscrollbox (client align) on the mainform and the following code:
var
frameBase: TFrame;
begin
framebase := TFrame1.create(self);
frameBase.parent := vertscrollbox1;
frameBase.align := TalignLayout.Horizontal; // otherwise the vertical scroll bar never appears
end;
How can I achieve this with a stand ? Changing the align property of the frame in a stand doesn’t change anything. With the following code, the vertical scrollbar never appears:
frameBase := FrameStand1.New(vertscrollbox1);
frameBase.Frame.align := TAlignLayout.Horizontal;
frameBase.Show();
Thanks
Jean Vandromme
Helo
How to know current Frame displayed?, i want to hide latest displayed frame when hardware back pressed. any idea?
Hello,
I try to use GestureManager into Frame, but I get an error:
"Unable to enable or disable IRealTimeStylus. The clear disable flag is set and all clear operations now require physical access". Can you help me?
Looks like the a merge totally corrupted the 10.2 packages. Lots of errors
Can i use yout TFrameStand in Commerical Apps ?
If Yes are there any requirements ?
I could not find the LICENSE file on Github ?
Awesome Component by the way 👍
Hi,
My Android (4.4.2) application is crashing with 'Can not activate current context' exception.
This is only happening when compiling it under Delphi Tokyo.
I have attached a sample project that reproduce my problem.
What do you think about adding an onAfterHide event ?
I created a very simple app which has a stylesheet and TFrameStand on the main form.
The main form has a button which calls the following code (where TFramePopup is my frame class):
fPopupFrame := FrameStand.New(Self, 'lightbox');
fPopupFrame.Frame.Align:=TAlignLayout.Contents;
fPopupFrame.Show;
The TFramePopup has a button which closes itself:
type
TFramePopup = class(TFrame)
Rectangle1: TRectangle;
layout: TLayout;
Button3: TButton;
procedure Button3Click(Sender: TObject);
private
[FrameInfo] fInfo: TFrameInfo;
public
end;
procedure TFramePopup.Button3Click(Sender: TObject);
begin
fInfo.Hide();
fInfo.Close();
end;
This works unless there's an animation in the 'lightbox' stand style in the stylesheet with the stylename "OnHideLightBox".
Run it and after the frame is closed, it tries to run the hide animation on the nil frame and crashes.
Hi, i was directed by Wizard example to create a one form app with dynamically loaded frames.
The problem is the moment when I need to "go" to a specific frame from within existing frame.
In other words, in Frame1 from a button action I set NextStept to be Frame2, the Frame2 is initialized (in ShowFrame and ShowNext from example) and also the Frame1 is freed, but the code returns to complete the button action from Frame1, but it is already destroyed.
How to make it right, to go to a specific frame from within another frame and destroy the first one?
In the "attached" example, shouldn't TForm1.FMyFrame get set to nil when you click the ca_closeframe button?
As you see in GetMyFrame it errors because while FMyFrame gets totally emptied .. it doesn't quite get set to nil.
I'm probably missing something.
Besides that awesome work on TFrameStand. Makes working for mobile so much more comfortable!
Hi
I have been using Dephi for almost 2 years and I installed the Rio version last week.
I noticed something weird on Android. I do not know if this is related to the changes of Android 9 - Pie (UI changes - View focus).
With the TframStand version 1.3 for Tokyo there is no problem.
I noticed that if there are big treatments that are launched the .
show of a frame do not work.
For you to check, I linked my project (Rio and Tokyo) : https://drive.google.com/drive/folders/1Hh4IhVR4_G9_2zTO08rCwpLT_g6ZivNK?usp=sharing
If you put 100000000 in the loop field, in the Tokyo version you will see the different frames display correctly. But with Rio we get the impression that it "freeze" because no frame is displayed.
I do not know if it's Rio the problem or if there is something wrong in my project or if there is something wrong with TFrameStand
Regards
Hi Andrea, I've developed a package that requires your FrameStandPackage_10_2.dcp package.
Sometimes when I open the IDE it raises the error: Component TFrameStand can't be registered by package FrameStandPackage_10_2_250.bpl because it has already been registered by package FrameStandPackage_10_2_250.bpl.
The solution to this problem would be to create two separated packages: One with the runtime code (FrameStandPackage_10_2_250.bpl) and a second one (dclFrameStandPackage_10_2_250.bpl) with the design time code.
Could you split your code in these two packages?
Another issue I found on line 758 in FrameStand unit at
if Assigned(FrameStand) and Assigned(FrameStand.OnAfterHide) then FrameStand.OnAfterHide(FrameStand, TFrameInfo<TFrame>(Self));
I get AV error, even without OnAfterHide set up.
When running a Berlin Delphi project on Windows (7) I receive an error if I assign (at design or runtime) a Gesture Manager to a component. The error is "Unable to enable or disable IRealTimeStylus: The clear disable flag is set and all clear operations now require physical access"
Hello,
I use this code to create a Frame .
I need to find if the Frame FFrameGraficoInfo exist in fPrincipal.FrameStand1,
If it exists I do not create it again and only use it, but I could not identify the correct syntax for the operation.
How to check if the TGraficoFrame exists in TFrameStand ?
procedure TfPrincipal.RelatoriosExecute(Sender: TObject);
Var
FFrameGraficoInfo : TFrameInfo;
begin
FFrameGraficoInfo := fPrincipal.FrameStand1.New(Layout);
dm.fdq_grafico.Active:= False;
fPrincipal.ShowForm(FFrameGraficoInfo.Frame.Panel1);
FFrameGraficoInfo.Show;
end;
we have a frame Tfr1 inherited from TFrame and other frame Tfr2 inherited from Tfr1.
after attempt to create TFrameInfo exception 'Invalid class typecast' is raising in
procedure TFrameInfo.InjectContext;
...
// injection
if (LAttribute is FrameStandAttribute) and (LFieldClassType.InheritsFrom(TFrameStand)) then
LField.SetValue(TObject(Frame), FrameStand)
else if (LAttribute is StandAttribute) and (LFieldClassType.InheritsFrom(TControl)) then
LField.SetValue(TObject(Frame), Stand)
else if (LAttribute is ParentAttribute) and (LFieldClassType.InheritsFrom(TFmxObject)) then
LField.SetValue(TObject(Frame), Parent)
else if (LAttribute is ContextAttribute) and (LFieldClassType.InheritsFrom(TFmxObject)) then
LField.SetValue(TObject(Frame), Container)
else if (LAttribute is FrameInfoAttribute) then
LField.SetValue(TObject(Frame), Self); <<<------------ HERE
...
Hello,
I'm trying to use the TFrameStand with Twebbrowse or TMapView.
When you run the application on windows or android error occurs.
Anyone know tell me if it is possible to use them with TFrame?
Thank you
Marcio Eduardo
Good day! Could you give some advice on how to use FrameStand in case of storing TFrame heirs in bpl packages?
missing unit ComponentRegistration in all DPK
ciao andrea!
with new berlin style editor, root layout is always set to "center" , so is impossibble to allign a frame to contents or client.
should override it in framestand :)
Hi,
Your github page is saying that 1.1 is the latest but 1.2 is :-)
I'm using TFrameStand to create a application wizzard like with a main form and frames changing dynamicaly.
But when I add a frame the main form loses focus and can not click on system buttons (minimize, maximize, close).
The code I am using is from samples exept I free the frames in OnAfterHide event from TFrameStand.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.