-
Posts
635 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Posts posted by artem_niko
-
-
1 minute ago, Sherzod said:
Yes, it will work.
And how apply second link?
-
2 minutes ago, Sherzod said:
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?
-
Just now, Sherzod said:
Maybe will use a mouseover event?
Well, if using this event will be better and will give the desired result, then you can use it
-
6 minutes ago, Sherzod said:
But what kind of code do you want to execute, client side or server side? Because let's say the mousemove event will be called many times...
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. -
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. -
Quote
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
What about this?
-
6 minutes ago, Sherzod said:
I mean, is the event assigned at all? Can you check again?
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:
-
2 minutes ago, Sherzod said:
Are you sure that the event has been assigned?
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:
-
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...
-
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;
-
4 minutes ago, Sherzod said:
You can try something like this I guess:
... if (UniPageControl1.Controls[I] is TUniTabSheet) then begin UniPageControl1.ActivePage := (UniPageControl1.Controls[I] as TUniTabSheet) end; ...
Will this trigger the OnBeforeActivate event on a dynamically created UniTabSheet?
-
1 minute ago, Sherzod said:
i.e. Do you want to activate the tab eventually?
Yes, something like that...
-
3 minutes ago, Sherzod said:
Try this approach:
function chart.beforeInit(sender, config) { //axisY config.axes[0].renderer = function(s, v, a) { a.attr.canvasAttributes.strokeStyle='red'; return '' }; //axisX config.axes[1].renderer = function(s, v, a) { a.attr.canvasAttributes.strokeStyle='green'; return '' }; }
And this working is perfect!
Thank you, @Sherzod!
- 1
-
6 minutes ago, Sherzod said:
Sorry, for what purpose !?
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.
-
2 minutes ago, Sherzod said:
Yes...
-
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;
-
45 minutes ago, Sherzod said:
And what were your settings?
Settings for tha what? Axes?
-
21 hours ago, Sherzod said:
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...
-
-
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.
-
Just now, Sherzod said:
Hello,
OnBeforeActivate?
Yes, I think, that it's all I need.
I'll try to use it somehow
-
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. -
Just now, Sherzod said:
Yes I think, but it takes time to analyze.
Ok, I'm will be waiting answer from you
-
On, are we solving this question at all?
Analog of the OnMouseMove or OnClick property in a UniFrame
in General
Posted
Well, if it can be done on the client side, then it would be better. The question is how to apply this code simply