Jump to content

artem_niko

uniGUI Subscriber
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by artem_niko

  1. Well, if it can be done on the client side, then it would be better. The question is how to apply this code simply
  2. Well, the first link is not exactly what I need... the second link, yes, something like that. But, will it work if the mouse cursor is over another component, for example, which is in a UniFrame?
  3. Well, if using this event will be better and will give the desired result, then you can use it
  4. What kind of code? Well, passing a pair of variables from UniFrame to MainForm. There will be no SQL queries or database accesses at this point.
  5. Good afternoon! Is there (is it possible) for a UniFrame to have an analog of the OnMouseMove or OnClick property? I need to execute some code while the mouse cursor is within the entire UniFrame. An important point: it does not matter which component the mouse is specifically located on or activated (UniEdit or UniPanel, etc.). Exactly, as long as it is within the UniFrame.
  6. No, I didn't dynamically assign this event... Then the question is, will this work if I: 1. Create the OnBeforeActivate event and assign it to a dynamically created Tabsheet; 2. From the UniPageControl1 menu to (Parent as TUniTabSheet), because UniTabSheet is the parent for Uni Frame 1, the contents of which are all on UniTabSheetBPL, in the same BPL file. Something, like that: procedure TMainForm.UniTabSheet(Sender: TObject; var AllowActivate: Boolean); var i: integer; begin for i := (Parent as TUniTabSheet).ControlCount - 1 downto 0 do if (Parent as TUniTabSheet).Controls[i] is TUniTabSheet then begin if Assigned(TUniTabSheet((Parent as TUniTabSheet).Controls[i]).OnBeforeActivate) then TUniTabSheet((Parent as TUniTabSheet).Controls[i]).OnBeforeActivate(((Parent as TUniTabSheet).Controls[i] as TUniTabSheet), Allow) end; end; Will it work? P.S. When I applying this get, I'm get error, when try change pages in UniPageControl:
  7. You mean make this when my UniTabSheet is creating? If "yes", so my UniTabSheet exist in my BPL file... Look at the scheme: On this scheme, UniTabSheetBPL - this is the tab where the code I need is located in the OnBeforeActivate event. You see, if there is a way, knowing the name of the global, inside the whole UniFrame1, variable that is stored in UniFrame1, to somehow pull it into MainForm, then UniTabSheetBPL would not exist at all. I have to use it somehow, because it has an OnBeforeActivate event, through which I wanted to get this variable. Without this tab, the scheme would be simpler:
  8. This is global var in MainForm? var Allow: Boolean; I'm writing that: procedure TMainForm.UniPageControl1ChangeValue(Sender: TObject); var i: integer; begin for i := UniPageControl1.ControlCount - 1 downto 0 do if UniPageControl1.Controls[i] is TUniTabSheet then begin if Assigned(TUniTabSheet(UniPageControl1.Controls[i]).OnBeforeActivate) then TUniTabSheet(UniPageControl1.Controls[i]).OnBeforeActivate((UniPageControl1.Controls[i] as TUniTabSheet), Allow) end; end; I'm not getting errors, but, my simple code in UniTabSheet.OnBeforeActivate not work: procedure TUniFrame1.UniTabSheet1BeforeActivate(Sender: TObject; var AllowActivate: Boolean); begin ShowToast((Sender as TUniTabSheet).Name); end; Message not showing...
  9. This code does not trigger the OnBeforeActivate event. Instead, when you open the first tab, and then the second one and start clicking on them, then clicking on the second tab immediately throws it to the first tab and makes it active, while the code in OnBeforeActivate does not work: procedure TMainForm.UniPageControl1Change( Sender: TObject); var i: integer; begin for Счетчик := UniPageControl1.ControlCount - 1 downto 0 do if UniPageControl1.Controls[i] is TUniTabSheet then begin UniPageControl1.ActivePage:=(UniPageControl1.Controls[i] as TUniTabSheet); end; end;
  10. And this working is perfect! Thank you, @Sherzod!
  11. Because I'm looking for a solution to a problem that is slowing down my development right now. In one of the topics, I said that I have the following sequence: the parent of the Uni PageControl for dynamically created unitabsheets, which in turn are the parents for dynamically created uniframes (each UniFrame on its UniTabSheet). So, I need, when changing tabs (when moving through them in the parent Uipagecontrol) to find the desired tab by name and trigger the UniTabSheet event from it.OnBeforeActive, which passes a variable from the UniFrame to the main program.
  12. Hello! I need, in a loop, to go through all the child, dynamically created unitabsheets in the parent UniPageControl, find the desired UniTabSheet by its name and call the OnBeforeActive event from it. How can this be done, how to pass parameters to a procedure where ... ? procedure TMainForm.UniPageControl1ChangeValue(Sender: TObject); var i: integer; begin for i := UniPageControl1.ControlCount - 1 downto 0 do if UniPageControl1.Controls[i] is TUniTabSheet then begin TUniTabSheet(UniPageControl1.Controls[i]).OnBeforeActivate(...); end; end;
  13. Thank you, @Sherzod! But, see: As you can see, it adds a signature on the left and numbers on the bottom, and I don't need to display them...
  14. Good afternoon! Need advice on the application of the code. There is a certain procedure that is stored in my DLL, everything is fine with that, I figured it out here) I need this procedure to work at the moment when the tab is accessed, i.e. I have such a chain: Uni PageControl1 is the parent for the dynamic UniTabSheet, which is the parent for the UniFrame, while UniTabSheet and UniFrame are both stored in the DLL and connected to the program as a plugin. Uipagecontrol - in MainForm. So, using the UniTabSheet1 event.OnBeforeActivate I need to somehow call my procedure this. It passes certain variables to the MainForm. How can this be implemented? Through what? Here the question is not so much with writing the code as with the idea, because I do not know how to call this procedure from my MainForm DLL.
  15. Yes, I think, that it's all I need. I'll try to use it somehow
  16. Good afternoon! I am interested in such a question. In standard Delphi VCL components, TabSheet has an event something like OnShow, when some code can be executed when displaying a tab. Is there the same event in uniGUI for UniTabSheet? I need to execute the code when the tab is being displayed.
  17. On, are we solving this question at all?
×
×
  • Create New...