AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

How to use frames?

Ein Thema von WojTec · begonnen am 29. Dez 2011 · letzter Beitrag vom 30. Dez 2011
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

How to use frames?

  Alt 29. Dez 2011, 18:04
Delphi-Version: 2010
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?
  Mit Zitat antworten Zitat
Furtbichler
(Gast)

n/a Beiträge
 
#2

AW: How to use frames?

  Alt 29. Dez 2011, 18:50
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.
  Mit Zitat antworten Zitat
Benutzerbild von s.h.a.r.k
s.h.a.r.k

Registriert seit: 26. Mai 2004
3.159 Beiträge
 
#3

AW: How to use frames?

  Alt 29. Dez 2011, 18:52
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.
»Remember, the future maintainer is the person you should be writing code for, not the compiler.« (Nick Hodges)
  Mit Zitat antworten Zitat
Benutzerbild von Bummi
Bummi

Registriert seit: 15. Jun 2010
Ort: Augsburg Bayern Süddeutschland
3.470 Beiträge
 
Delphi XE3 Enterprise
 
#4

AW: How to use frames?

  Alt 29. Dez 2011, 18:52
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.
Thomas Wassermann H₂♂
Das Problem steckt meistens zwischen den Ohren
DRY DRY KISS
H₂ (wenn bei meinen Snipplets nichts anderes angegeben ist Lizenz: WTFPL)
  Mit Zitat antworten Zitat
Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.343 Beiträge
 
Delphi 11 Alexandria
 
#5

AW: How to use frames?

  Alt 29. Dez 2011, 19:14
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.
Sebastian Jänicke
Alle eigenen Projekte sind eingestellt, ebenso meine Homepage, Downloadlinks usw. im Forum bleiben aktiv!
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#6

Re: How to use frames?

  Alt 30. Dez 2011, 11:17
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.
  Mit Zitat antworten Zitat
Furtbichler
(Gast)

n/a Beiträge
 
#7

AW: How to use frames?

  Alt 30. Dez 2011, 12:04
Please open a new thread for a new question. This one has got nothing to do with 'Frames'.
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#8

Re: How to use frames?

  Alt 30. Dez 2011, 13:04
Okay
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:53 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