Jump to content

Stano

Members
  • Content Count

    894
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Stano

  1. I'm using google translate. The result is appalling. To the problem: it is on the db where to store the record. You must don't care! You must secure the order in Query using ORDER BY. Not different.
  2. My component contains the field FVirtualTree: TBaseVirtualTree; FVirtualTree is not a subcomponent. There are examples of this. Assigned during design. I need to write an OnChange event for FVirtualTree in the component. It should work like this When writing a component: for FVirtualTree I will create OnChange. I'll write my code At design runtime Assign to component (property VirtualTree) Vst1 (TVirtualStringTree) For Vst1 I define the OnChange event During the runtime I change the node - it calls Vst1.OnChange I'll do something there I call FVirtualTree.OnChange Vst1.OnChange completes I did not find anything about such a case.
  3. I gave up the original idea. What I asked here.
  4. You brought me the following solution, which I originally rejected. That's not how I imagined it. It's the easiest. Thanks! procedure TfrmMainForm.jstvst1Change(Sender: TBaseVirtualTree; Node: PVirtualNode); var NodeData: PAddress; begin if not Assigned(Node) then Exit; NodeData := jstvst1.GetNodeData(Node); jstnav1.PKeyValue := NodeData.PKey; jstnav1.VirtualTreeChange(Sender, Node); // I thought he would be inherited here
  5. Unfortunately, it's not good. It behaves as if I simply / directly assigned the event to VST. It means: the TjstVstDBNavigator.VirtualTreeChange procedure is called (Sender: TBaseVirtualTree; Node: PVirtualNode); MyVst.OnChange is NOT called
  6. Looks like yes. I'll try and let you know.
  7. 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.
  8. 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.
  9. 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.
  10. Stano

    Dynamic creation of TActionManager with Actions

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

    Dynamic creation of TActionManager with Actions

    The problem is gone. Don't know why / how yet. Keep the topic closed.
  13. 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
  14. Stano

    Migration Tool (11 --> 11.1)

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

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Like on sleigh in the summer
  16. Stano

    Dynamic creation of TActionManager with Actions

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

    Delphi 11.1 is available

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

    SearchBuf is deprecated

    Fill in the unit name before the function name!
  19. 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.
  20. And what about us who don't know English?
  21. 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.
  22. 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?
  23. Stano

    What is good replacement for FastReports?

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

    Rad Studio Access Violation

    That's why I only have one panel on the Welcome Page. With a list of projects.
  25. 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);
×