Re-re-hello Sieghard.
The last for tonight.
So I did make public onmouseevent for mseSimpleWidget:
In msewidgets.pas, added in parent class of simplewidget this:
----------------------------
tactionpublishedwidgetnwr = class(tactionwidget)
published
...
property onmouseevent;
----------------------------
And recompiled ideU with it.
Now onmouseevent appear in object inspector for your panel-background.
Using this (needs msepointer in uses section):
----------------------------
var
oripoint : pointty;
ispressed : boolean;
...
procedure tclockworkfo.ev_onmouseevent(const sender: twidget;
var ainfo: mouseeventinfoty); // assigned to Panel-background
begin
if ainfo.eventkind = ek_buttonpress then
begin
ispressed := True;
oripoint := ainfo.pos;
cursor := cr_pointinghand;
end;
if ainfo.eventkind = ek_buttonrelease then
begin
ispressed := False;
cursor := cr_default;
end;
if (ispressed = True) and (ainfo.eventkind = ek_mousemove) then
begin
left := left + ainfo.pos.x - oripoint.x;
top := top + ainfo.pos.y - oripoint.y;
end;
end;
----------------------------
..., now the rounded clock can move.
Here video in action:
https://user-images.githubusercontent.com/3421249/190512388-da002241-3f74-4121-9764-52eae75e3437.mp4
What do you think to make onmouseevent public for SimpleWidget?
Good night.
Fre;D
________________________________
De : Fred van Stappen <[email protected]>
Envoyé : jeudi 15 septembre 2022 22:34
À : General list for MSEide+MSEgui <[email protected]>
Objet : Re: [MSEide-MSEgui-talk] Transparent background of form.
Re-hello Seighard.
About the code that I have given to move the window, it will not work because
the background is a panel not the form.
Strange but the method onmouseevent() is not enabled-public for mse-panels.
Is it wanted?
And to enable-make-it-public (if it is not a crime) what is the good way to do
it?
I would like to have onmouseevent() for mse-groupbox (and other widgets too).
Thanks.
Fre;D
________________________________
De : Fred van Stappen <[email protected]>
Envoyé : jeudi 15 septembre 2022 21:52
À : General list for MSEide+MSEgui <[email protected]>
Objet : RE: [MSEide-MSEgui-talk] Transparent background of form.
Hello Sieghard.
I will do it step by step.
Fisrt: MSEclock.
It compiles and runs fine. (when copy all files from /MSEclock/newdialogs/ into
MSEclock)
- The Font dialog: very nice and usefull, t should be added in
MSEgui/MSEdialogs.
I suppose that the options Bold, Italic, Underline, Strikeout, Blank are not
yet enabled because in the test-caption it does not work.
(See attachment)
' Rounded form works well too.
I like your method Self.Window.RecreateWindow; (that I will deeply studdy)
Maybe it would be good to make the clock movable (with click+hold on the
clock-form).
Something like this:
var
oripoint : pointty;
....
procedure tclockworkfo.ev_onmouseevent(const sender: twidget;
var ainfo: mouseeventinfoty);
begin
if ainfo.eventkind = ek_buttonpress then
begin
ispressed := True;
oripoint := ainfo.pos;
cursor := cr_pointinghand;
end;
if ainfo.eventkind = ek_buttonrelease then
begin
ispressed := False;
cursor := cr_default;
end;
if (ispressed = True) and (ainfo.eventkind = ek_mousemove) then
begin
left := left + ainfo.pos.x - oripoint.x;
top := top + ainfo.pos.y - oripoint.y;
end;
end;
. Language selection is OK too.
I see in /MSEclock/newdialogs/ lot of dialogs-units, did you change all those
dialogs from original MSEsource?
If yes, what is mainly changed?
I will not eat all your other delicious code tonnight and keep some for today.
Congrats and thanks Seighard.
Fre;D
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk