tframe

Delphi IDE treating TFrame as if it were a Form

妖精的绣舞 提交于 2019-12-22 05:16:16
问题 Every once in a while when I am tweaking my TFrame classes (adding properties, methods, etc), the IDE gets confused and acts as if it thinks the frame is a form, complete with header/caption, borders, etc. Yet, clearly the class is declared as a TFrame descendent. Any ideas as to what causes this, how to prevent, and how to fix? I'm using Delphi 2007 Pro. Also note (if it matters), the TFrame descendents are typically registered with the IDE (i.e. on the palette) via a design-time package.

Frame inheritance and duplicate files in packages

时光毁灭记忆、已成空白 提交于 2019-12-20 03:00:10
问题 I have been developing a number of components using TFrames and ModelMaker -- I've found the combination of visual design/development + inheritance + ModelMaker to be very compelling. I then register these TFrame descendants w/a registration unit, and they become full-fledges palette-based components from there. I'm using Delphi 2007. Early in my learning about the little "snags" of this process, I found that a number of the problems I would run into with TFrame descendants streaming

How to improve the use of Delphi Frames

不打扰是莪最后的温柔 提交于 2019-12-17 17:28:57
问题 I've used frames in Delphi for years, and they are one of the most powerful features of the VCL, but standard use of them seems to have some risk such as: It's easy to accidentally move or edit the frame sub-components on a frame's host form without realising that you are 'tweaking' with the frame - I know this does not affect the original frame code, but it's generally not what you would want. When working with the frame you are still exposed to its sub-components for visual editing, even

Delphi: frame properties do not update when I expect them to (they get stuck)

和自甴很熟 提交于 2019-12-12 08:15:08
问题 I have a frame on a form. When I change the frame (add/delete buttons, labels) no changes appear on the form or controls have other positions in the form that in the frame. If to delete the frame from the form and add it again -> Ok. Why? As I remember there were no problems in Delphi 2010 (now-Delphi XE). Thanks. 回答1: So you had created a frame, and then dropped an instance of it on another form, and the problem is that later changes made to the original frame are not immediately shown until

EventHandler inside a TFrame?

陌路散爱 提交于 2019-12-12 08:14:53
问题 I have a TForm (TVehicleEditForm) with 3 identical TFrames (TVehicleUnitFrame) inside. The idea was that every instance of the frame handle own events by a eventhandler inside the frame. The problem is that the eventhandler is not called. I have tried to assign the eventhandler by code inside the frame by overriding the Create method but the handler is not called in that case either. But if I assign the eventhandler outside the frame from the form it works fine. Like this:

Where to free dynamically allocated TFrame's components' objects?

喜夏-厌秋 提交于 2019-12-10 13:29:09
问题 I have a form containing a TFrame . The TFrame contains a ComboBox that is dynamically populated. Each ComboBox entry has an associated object. By the time the overridden destructor for the TFrame is called, the Items in the ComboBox have already been cleared without freeing their associated objects. This happens whether I drop the ComboBox on the form in designer view, or dynamically create it in code with either nil or the TFrame as its owner. I currently use the OnDestroy event of the

Delphi XE8 styles do not work with TFrames? How to fix this?

青春壹個敷衍的年華 提交于 2019-12-10 11:58:45
问题 I use TFrames . I make them dynamically by adding them to the Form window. I chose the style called "Glow" (others also). I launched the program and the style works only on the main Form window, they do not work on the controls TFrame . Why? I tried to add: TStyleManager.SetStyle for the Frame Form but with no effect. 回答1: I have fixed this bug. If you will change Frame Form Color property manually, it will make a bug. You must select your Frame and go to properties and turn on the

Using TFrame, how do I properly access the TCanvas property just as in a TForm?

六月ゝ 毕业季﹏ 提交于 2019-12-08 14:22:30
问题 I need to draw on the frames Canvas at runtime just like you would do with a normal form but for some reason they decided not to add the Canvas property to the frame even tho both TCustomFrame and TCustomForm come from the same parent class that handles the Canvas. I've made it work up to the part where I can draw something by overriding the PaintWindow procedure but I still can't seem to use the Canvas property at runtime as if I'm missing a big chunk of the code. Here's what I've done up to

Load Tframe from bpl to application

旧巷老猫 提交于 2019-12-08 05:26:18
问题 I am trying to load a tframe inside a delphi package (bpl) to be shown in my main app please give me code for both package and application. 回答1: Give a man a fish and he eats for a day, learn a man to fish and he eats his whole life. So no code for you :) How you should do it: Start Delphi, Create a new package. Add a TFrame to your bpl Save and compile, you should now have a .bpl and a .dcp. Close all Create a new application In your project properties, turn on "Build with Runtime packages"

TFrame inheritance refactoring

淺唱寂寞╮ 提交于 2019-12-06 08:59:51
问题 Yet another TFrame IDE-registered-component question from me. Thanks for all the help, fellow programmers. : ) Playing around with Darrian's TFrame inheritance suggestion here: Specifics: Basically, I have a TFrame-based component that I've registered to the IDE, and it has worked wonderfully. I'm now developing a few "sister" components which will share a great deal of the existing component's non-visual functionality and properties. It makes sense, then, to move a lot of that to a parent