Jump to content

Stano

Members
  • Content Count

    888
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Stano

  1. Stano

    TImage (JPG) not scaling, but PNG and BMP DO ???

    I guess he meant TVirtualImage instead of TVirtualImageList. OT because I wrote about image quality. Not about the subject of the question. Uwe is right. I did it with ActionToolBar. I didn't realize the difference.
  2. Stano

    TImage (JPG) not scaling, but PNG and BMP DO ???

    OT: I recommend using TImageCollection and TVirtualImageList. This significantly increases the quality of the images. I don't know if the problem will solve it.
  3. Hi, I want to create a component based on TActionToolBar. I want to dynamically create a TActionManager in it. TActionManager to populate TAction. I have this code procedure TjstVstDBNavigator.NewActions; var ItemIndex: Cardinal; ActionBarItem: TActionBarItem; ActionClientItem: TActionClientItem; begin // My code if Assigned(FAcnMan) then FreeAndNil(FAcnMan); FAcnMan := TAcTionManager.Create(Self); FAcnMan.SetSubComponent(True); Self.ActionManager := FAcnMan; FActions.Clear; // Copied code ActionBarItem := FAcnMan.ActionBars.Add; for var IdxActn in FRequiredIdxActn do begin ItemIndex := Ord(TIndexAction(IdxActn)); // Create new action for a menu/ActionToolBar item FActions.Add(TAction.Create(Self)); FActions.Last.Category := 'PopupMenuItems'; .... // Add this action to the Action Manager FActions.Last.ActionList := FAcnMan; // Also add this action to the Action Bar ??? actionClientItem := ActionBarItem.Items.Add; actionClientItem.Action := FActions.Last; end; // My code Self.ActionClient := FAcnMan.ActionBars[0]; end; The buttons are displayed. But only Caption. I want to set the TAction properties as follows (copied from Embt): procedure TjstVstDBNavigator.ApplyShowOnAction; const NoActionToolBar = -1; var Action: TAction; BarItem: TActionBarItem; Client: TActionClientItem; K: Integer; begin for var J := 0 to FAcnMan.ActionBars.Count -1 do // OK begin BarItem := FAcnMan.ActionBars.ActionBars[J]; // I'm done here if BarItem.ActionBar <> nil then begin for K := 0 to BarItem.Items.Count -1 do begin Client := BarItem.Items[K]; if Client.Action <> nil then begin Action := (Client.Action as TAction); if Action <> nil then begin Client.ShowShortCut ...; ... end; I don't have the whole structure in ActionManager. The figure shows the structure created by the ActionManager. I need that. I have no idea how to do it.
  4. Stano

    Dynamic creation of TActionManager with Actions

    The solution, as always, is simple: FAcnMan.ActionBars[0].ActionBar := Self; /// - TActionToolBar
  5. Unfortunately not at all. Professional does not contain FireDAC files!
  6. Stano

    Dynamic creation of TActionManager with Actions

    The problem is gone. Don't know why / how yet. Keep the topic closed.
  7. Stano

    Dynamic creation of TActionManager with Actions

    I just pushed the problem. I'll open a test project. I'll run it. I will close the app and the appropriate pas unit. I open the pas unit. I'm getting an error while loading. The reason is that I miss the part in the frame. See picture. I can't do it. Can anyone help me? acttb1.ActionManager := actmgr1; ActionBarItem := actmgr1.ActionBars.Add; for var ItemIndex := 0 to 4 do begin // Create new action for a ActionToolBar item Action := TAction.Create(Self); Action.Category := 'Database'; // Add this action to the Action Manager Action.ActionList := actmgr1; // Also add this action to the ActionBar actionClientItem := ActionBarItem.Items.Add; actionClientItem.Action := Action; end; acttb1.ActionClient := ActionBarItem; acttb1.ActionManager := actmgr1
  8. Stano

    Migration Tool (11 --> 11.1)

    Not for me. I used a Web installer. During the installation, I chose to keep the settings.
  9. Stano

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Like on sleigh in the summer
  10. Stano

    Dynamic creation of TActionManager with Actions

    If I throw this condition if BarItem.ActionBar <> nil then then I'll get it right
  11. Stano

    Delphi 11.1 is available

    I will only point out that unless you delete the registry, all installed add-ons will be preserved.
  12. Stano

    SearchBuf is deprecated

    Fill in the unit name before the function name!
  13. I would welcome that. I could do it with Google Transaltor I read a few articles that sent me a link to them. I have to agree with the discussants above. It was not interesting there, specifically or new. And I'm a lousy amateur.
  14. And what about us who don't know English?
  15. Deleting invalid roads has in the past led to the complete collapse of the IDE. I strongly recommend using qualified unit names. You will avoid this problem. For new units, it is quite often a duty.
  16. Stano

    Firebird transactions with Firedac

    I don't think logic anymore. What happens if you have the same dates? Are the dates changing? The date itself is a unique number. Isn't that enough for you?
  17. Stano

    What is good replacement for FastReports?

    Portuguese is spoken in Brazil. That's just for a possible translation.
  18. Stano

    Rad Studio Access Violation

    That's why I only have one panel on the Welcome Page. With a list of projects.
  19. Stano

    Formatting inline var

    The code does not work. I immediately realized why. I use TVirtualStringTree (VST). That data is stored in the record. I have it defined as follows PTableData = ^ TrTableData; TrTableData = record Booleans: TList <Boolean>; Currencys: TList <Currency>; Dates: TList <TDate>; Integers: TList <Integer>; Others: TList <Variant>; Strings: TList <string>; end; For each VST, its structure is different. Some lists will not be created at all. Therefore, the following fails: var NodeData: = VST.GetNodeData (Node); It must be var NodeData: PTableData: = VST.GetNodeData (Node);
  20. Stano

    Formatting inline var

    Yes. There are situations where the compilator doesn't know / cannot determine the data type.
  21. Stano

    Up to date SuperObject?

    SuperObject development has been completed. He did another, but I don't remember the name. I have v1.2
  22. Stano

    Formatting inline var

    There is content for that.
  23. Stano

    Formatting inline var

    It is true. But there weren't 100 of them I don't know exactly what you mean by "official source". The original no longer exists. Totally down. https://en.delphipraxis.net/topic/6357-a-book-about-object-pascal-style-guide/?page=3
  24. Stano

    Formatting inline var

    That is not possible. Download the book by Bent Normann Olsen (docx). Page 71. See above
  25. I don't know what and when it delete some spaces. I fixed it. Fixed other errors using Google Translator. To be sure, I put it packed. I don't want to fix / modify it anymore. I use MS Office 2007! Object Pascal Style Guide - Developers Guide EN.zip
×