Jump to content

limelect

Members
  • Content Count

    835
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by limelect

  1. limelect

    On IDE cannot get TABS

    http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/TypInfo.html Investigating
  2. limelect

    On IDE cannot get TABS

    As of my last request reading an item like integer is no problem like PropInfo:= GetPropInfo(x.ClassInfo, 'LastShownIndex'); i:= GetOrdProp( x,PropInfo); Label2.Caption:=inttostr(i); But items=stringlist how?
  3. limelect

    On IDE cannot get TABS

    @dummzeuch With the help of this link and IDE explorer IIIIII DDDDIDDDD IT. From here I got https://stackoverflow.com/questions/2071247/dynamically-access-a-property-in-a-delphi-component/2071398 var PropInfo: PPropInfo; x:=TComponent(x.FindComponent('TabControl')); PropInfo:= GetPropInfo(x.ClassInfo, 'TabIndex').; SetOrdProp(x, PropInfo, 3); it press tab 4. Thanks every body and see you on my next NOT EASY problem. P.S may some know how to get a list of items from PropInfo:= GetPropInfo(x.ClassInfo, 'Items') into StrinList?
  4. limelect

    On IDE cannot get TABS

    The joke is on me. They did not implement it only the d7. Back to the search
  5. limelect

    On IDE cannot get TABS

    I will look further with your advice that it is TGradientTabSet and not TabControl But if I use IDE explorer (sorry not yours) I see all the properties and I do not see TABS but Items so you might be correct On CnWizard there is something to associate the toolbar search for TGradientTabSet. I will investigate
  6. limelect

    On IDE cannot get TABS

    Yes, I used your GREP already and I still, unfortunately, did not understand how to use it. Any idea? It will not work. For example, it has FTabList :TList; FTabList :TStringList; Is it allowed? Something fishy.
  7. limelect

    On IDE cannot get TABS

    @dummzeuch I will try P.s i saw it before It is not implemented. No idea how to use it.
  8. limelect

    On IDE cannot get TABS

    @dummzeuch Yes ClassName and more. Every thing checked. It is a TTabControl and I even did a hide that hides all the tabs. with IDE Explorer (Not yours) I can see all propeties. ComponentToolbarFrame>TabControl=TTabControl My only problem now is that TABS is not nil but using it give an error.
  9. limelect

    On IDE cannot get TABS

    P.S TTabControl(x).Visible:=false; make all the tabs disapear. So I have control of the tabs but not on TTabControl(x).Tabs
  10. limelect

    On IDE cannot get TABS

    @dummzeuch Thanks I used it. However, I sent you a personal mail with comments and changes to your software for you to add and publish. As for my problem, it seems I cannot reach the component tabs. Although TTabControl(x).Tabs in not nil it cannot be accessed.
  11. limelect

    On IDE cannot get TABS

    I cannot find IDE Explorer. I use 1.3.11.64 experimental quit old I gess.
  12. limelect

    On IDE cannot get TABS

    @dummzeuch I will try. However, what I did on each FindComponent I made sure it is not nil and save all components to file with ComponentCount Components.Name this how I found all the names.
  13. Using D10.2.3 function TForm1.GxOtaGetCurrentModule: IOTAModule; var ModuleServices: IOTAModuleServices; begin ModuleServices := BorlandIDEServices as IOTAModuleServices; Assert(Assigned(ModuleServices)); Result := ModuleServices.CurrentModule; end; function TForm1.GxOtaGetFormEditorFromModule(const Module: IOTAModule): IOTAFormEditor; var i: Integer; Editor: IOTAEditor; FormEditor: IOTAFormEditor; begin Result := nil; if not Assigned(Module) then Exit; for i := 0 to Module.GetModuleFileCount - 1 do begin Editor := GxOtaGetFileEditorForModule(Module, i); if Supports(Editor, IOTAFormEditor, FormEditor) then begin Assert(not Assigned(Result)); Result := FormEditor; // In order to assert our assumptions that only one form // is ever associated with a module, do not call Break; here. end; end; end; function TForm1.GxOtaGetFileEditorForModule(Module: IOTAModule; Index: Integer): IOTAEditor; begin Assert(Assigned(Module)); Result := Module.GetModuleFileEditor(Index); end; procedure TForm1.Button2Click(Sender: TObject); var CurrentModule: IOTAModule; CurrentForm: IOTAFormEditor; lComponent: IOTAComponent; begin CurrentModule := GxOtaGetCurrentModule; Assert(Assigned(CurrentModule)); CurrentForm := GxOtaGetFormEditorFromModule(CurrentModule); if CurrentForm.GetSelCount > 0 then lComponent := CurrentForm.GetSelComponent(0) else lComponent := CurrentForm.GetRootComponent; if not lComponent.IsTControl then begin ShowMessage('The Component of Selected is not Container Control!'); exit; end; //CurrentForm.GetSelComponent(0).GetComponentType; Label2.Caption:=lComponent.GetComponentType; <<<<< Tpanel or Tform Label3.Caption:= CurrentForm.FileName; <<< file.dfm // CurrentForm.CreateComponent(lComponent, 'TADOtable', 0, 0, 50, 50); <<<< This is OK ///THIS IS WHERE THE ERROR IS CurrentForm.CreateComponent({CurrentForm.GetSelComponent(0)}lComponent, 'TLabel', 0, 0, 50, 50);<<<< This is an ERROR end; ERROR = Class TLabel is not applicable to this module Any help?
  14. @David Hoyle I modified your software for FMX too and it works as it should be. Thanks again. P.S BPL is easier to work with you do not need to close Delphi and restart or have a second Delphi open. .
  15. @David Hoyle Thanks. As I said you are the EXPERT. I will modify for fmx too. Hopffuly I will succeed .
  16. @Jud My Getit does not work on D10.2.3 it shows error. Is what you showed will work here in my case ? What exactly the above mean?
  17. @David Hoyle I am working with BPL so I do not need to RESTART Delphi after instalation as in DLL. I took a different path for creating so, can you put here your test program so I can try it. May be your path does not do that fmx problem. Thanks P.S I have in my software if not lComponent.IsTControl then begin ShowMessage('The Component of Selected is not Container Control!'); exit; end;
  18. A new problem on fmx. My test is always TLabel. On VCL If the container is Tlabel then the program creates The label on top of a label. Position 0,0. which is OK. If the first label is in the middle of the form the second label will be on top of the first in the middle of the form. Nothing special to say about VCL. ON fmx putting a label on top of another label is a mess. The second label position is thrown at -500 or greater on both axes. Which it does create but put it at a place outside of the 0,0 container. If I RESELECT the form or pannel before creating the component , IT IS OK. I hope I am understood.
  19. @David Hoyle @Remy Lebeau that did it I just added ActivateClassGroup(Vcl.Controls.TControl); @David Hoyle I could not tell everybody how much you help. Thank you very much. And to you @Remy Lebeau that did it thanks. What i did is adding if ExtractFileExt(CurrentForm.FileName)='.dfm' then ActivateClassGroup(VCL.Controls.TControl); So i have it for both Now @David Hoyle when you write the BLOG plz notify me. Thanks. It was a long road for both of us.
  20. @David Hoyle Going to try now
  21. @David Hoyle I did try 'Vcl.StdCtrls.TLable' it did not make any mistake but did not create a component. All the time I am trying with my base instruction CurrentForm.CreateComponent(lComponent, 'Vcl.StdCtrls.TLabel', 0, 0, 50, 50); << this did not make a mistake. however, the list of components is like TLabel and not Vcl.StdCtrls.TLabel. The last few hours I tried from string to class and going from there but did not succeed function FindAnyClass2(const Name: string): TClass; >> this is ok but from here to IOTAComponent; i am again stack. var 😄 TClass; ctx: TRttiContext; typ: TRttiType; begin ctx := TRttiContext.Create; typ := ctx.FindType(Name); if (typ <> nil) and (typ.IsInstance) then c := typ.AsInstance.MetaClassType; result:=c; ctx.Free; end; I really do not have a solution. I am an expert in real-time processes. Making software for big companies but am not an expert in EXPERT.
  22. @David Hoyle Unfortunately I do not understand "fully qualified name". An example of "fully qualified name"? What I get from the IDE is a component name as a string. Is there another way? The successful "CreateComponent" uses a component name, not a string, that needed a USES, which is not good. Ok i read the explanation So what you mean is to go from "TStream" to System.Classes.TStream and then use that?
  23. Thanks, @Remy Lebeau I thought it will be complicated. Do you have an idea why "CreateComponent" does not work on VCL? Is it a Delphi bug?
  24. Thanks, everybody. After trying to solve my problem with ALL "CreateComponent" (tried a few) it seems that I do not have a solution for VCL. I hope maybe @David Hoyle will find a solution? So for my last question for this is it possible to distinguish , when I have a component name as a string, if it is for VCL of FMX. I know that fact from the registry but that not good enough since NOT all components are written there. The components list names are taken from PackageServices := BorlandIDEServices as IOTAPackageServices;
  25. limelect

    Converting simple VCL form to FMX

    Can this be of any help? http://www.innovasolutions.com.au/delphistuf/ADUGVCLtoFMXConv.htm
×