运行时设计窗体 (50分)

  • 主题发起人 主题发起人 little_five_gqw
  • 开始时间 开始时间
L

little_five_gqw

Unregistered / Unconfirmed
GUEST, unregistred user!
哪位大哥有psoft FormEdit library的源码?
我下载的无源码,十分不方便。
其它类似控件的下载地址也可以
 
搜索一下嘛!GOOGLE
 
谢谢delphihsc大哥,我已将在Google上找了两天了,还未找到源码
还能从哪里找呢?
 
我想问一句,它的事件处理是通过脚本解释还是其他方法?
 
不需要事件处理,只要将控件放到窗体上就可以了
 
那你可以自己做一个:

给你一些关键性的步骤。
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
StdCtrls, ExtCtrls, Buttons, Clipbrd, Comctrls, Db, Dbcgrids,
Dbctrls, Dbgrids, Dblookup, Dbtables, Ddeman, Dialogs,
Filectrl, Grids, Mask, Menus, Mplayer, Oleconst, Olectnrs,
Olectrls, Outline, Tabnotbk, Tabs;

type
TClassArray = array [1..107] of TPersistentClass;

// definition temporary used to check the data types
// TClassArray = array [1..107] of TComponentClass;

const
ClassArray: TClassArray = (
TApplication, TDDEServerItem, TPanel, TAutoIncField,
TDirectoryListBox, TPopupMenu, TBatchMove, TDrawGrid,
TPrintDialog, TBCDField, TDriveComboBox, TPrinterSetupDialog,
TBevel, TEdit, TProgressBar, TBitBtn,
TField, TQuery, TBlobField, TFileListBox,
TRadioButton, TBooleanField, TFilterComboBox, TRadioGroup,
TButton, TFindDialog, TReplaceDialog, TBytesField,
TFloatField, TCheckBox, TFontDialog,
TRichEdit, TColorDialog, TForm, TSaveDialog,
TComboBox, TGraphicField, TScreen, TCurrencyField,
TGroupBox, TScrollBar, TDatabase, THeader,
TScrollBox, TDataSource, THeaderControl, TSession,
TDateField, THotKey, TShape, TDateTimeField,
TImage, TSmallIntField, TDBCheckBox, TImageList,
TSpeedButton, TDBComboBox, TIntegerField, TStatusBar,
TDBCtrlGrid, TLabel, TStoredProc, TDBEdit,
TListBox, TStringField, TDBGrid, TListView,
TStringGrid, TDBImage, TMainMenu, TTabbedNotebook,
TDBListBox, TMaskEdit, TTabControl, TDBLookupCombo,
TMediaPlayer, TTable, TMemoField, TDBLookupComboBox,
TMemo, TTabSet, TDBLookupList, TTabSheet,
TDBLookupListBox, TMenuItem, TTimeField, TDBMemo,
TNotebook, TDBNavigator, TOleContainer, TTimer,
TDBRadioGroup, TOpenDialog, TTrackBar, TDBText,
TOutline, TTreeView, TDDEClientConv, TOutline,
TUpdateSQL, TDDEClientItem, TPageControl, TUpDown,
TDDEServerConv, TPaintBox, TVarBytesField, TWordField);

procedure GenerateComponent(AParent:TComponent;AClass:String;X,y:Integer);
var //AClass来自ComboBox1或你自己定义的东西
MyClass:TComponentClass;
MyObj:TComponent;
begin
MyClass:=TComponentClass(GetClass(AClass));
if MyClass=nil then beep;
else
begin
MyObj:=MyClass.Create(AParent);
if MyObj.InheritsFrom(TControl) then
begin
TControl(MyObj).Left:=X;
TControl(MyObj).top:=Y;
TControl(MyObj).Parent:=AParent;
end;
end;
end;


procedure TMainForm.FormCreate(Sender: TObject);
var
I: Integer;
begin
//注册类
RegisterClasses (Slice (ClassArray, High (ClassArray)));
for I := Low (ClassArray) to High (ClassArray) do
ComboBox1.Items.Add (ClassArray .ClassName); //在主Form上放个ComboBox1,然后根据在ComboBox1中的选择
//调用上面的过程生成组件。
end;




 
接受答案了.
 
后退
顶部