Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi How to use frames? (https://www.delphipraxis.net/165420-how-use-frames.html)

WojTec 29. Dez 2011 18:04

Delphi-Version: 2010

How to use frames?
 
I never use frames, what exactly is it for and how to use it?

I created a frame and added TFrames component and what next? How to load another frame for example?

Furtbichler 29. Dez 2011 18:50

AW: How to use frames?
 
What? Can't you read or use F1?

Select New->Frame. Drop some controls on it and add functionality. Save it or leave as is.

Open a new form, select 'Frames' from the component selection. You will be prompted to select a frame which has been defined in your project.

select it and -whooosh- you got it on your form.

Cool for having a standard functionality for certain tasks. e.g.

s.h.a.r.k 29. Dez 2011 18:52

AW: How to use frames?
 
One example: you want to build a component which consists of several other components, like a TEdit plus a TButton for a file search. So you place a TEdit and a TButton on a TFrame and call it TFileSearchFrame. After you implemented the logic you can reuse this frame every time you want to, like every other component.

Bummi 29. Dez 2011 18:52

AW: How to use frames?
 
You can create them at runtime and set the parent.
I on my own prefer using forms and setting their parent.
The only advantage is that you can place frames at designtime.

jaenicke 29. Dez 2011 19:14

AW: How to use frames?
 
Zitat:

Zitat von Bummi (Beitrag 1143668)
The only advantage is that you can place frames at designtime.

And that it works in all cases. If you place a form on another one you can get into trouble when using certain mouse drivers. And you have problems with some theming tools, because for example they try to paint a small border even if you disabled it. Or try to add transparency under XP.

Since some of my users had such problems I avoid such dirty tricks like placing forms on other ones.

WojTec 30. Dez 2011 11:17

Re: How to use frames?
 
Oh, I see, thanks guys.

I have just one question: on frame I have color selector. How can I assign choosed color in "real time" to any color property on main form (selecting color from image by mouse down and moving cursor)? When I want to modify object it's simple, because I can do it by pointer, but how about simple types?

I added var FColor: PColor. When picking color C := SelectedColor and then FColor := @C. Don't changing.

Furtbichler 30. Dez 2011 12:04

AW: How to use frames?
 
Please open a new thread for a new question. This one has got nothing to do with 'Frames'.

WojTec 30. Dez 2011 13:04

Re: How to use frames?
 
Okay


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:58 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz