On Tuesday 30 July 2013 09:28:20 minoshi wrote:
>
> One question:
> I make new project and write next:
> ========
> // button onexecute event
> procedure tmainfo.on_execute(const sender: TObject);
> begin
> case b_fullscreen.tag of
> 0 : begin
> b_fullscreen.tag := 1;
> mainfo.options := mainfo.options + [fo_fullscreen] -
> [fo_defaultpos]; end;
> 1 : begin
> b_fullscreen.tag := 0;
> mainfo.options := mainfo.options - [fo_fullscreen] +
> [fo_defaultpos]; end;
> end;
> end;
>
Hint: fo_defaultpos is used to forget the design time form position on first
creation of the window so the windowmanager can place the window freely.
Don't set fo_defaultpos in the on_execute procedure. This triggered a MSEgui
bug, fixed in mentioned git master d18c01a246ab6cd67815c91f0e524b6db1cc23c3.
> //resize form event
> procedure tmainfo.on_resizeform(const sender: TObject);
> begin
> writeln('resize event');
> writeln('l=',left);
> writeln('t=',top);
> writeln('w=',width);
> writeln('h=',height);
> end;
> =====
>
> Run project and click twice on button.
> Got next output:
> ==========
> resize event <- here when form created
> l=401
> t=194
> w=403
> h=280
> resize event <- here when first click (go to fullscreen) Why left
> =400 and top = 176? As logical it must be = 0
> l=400
> t=176
> w=1920
> h=1080
> resize event <- here when second click (go from fullscreen). here
> now questions
> l=401
> t=194
> w=403
> h=280
> ==========
>
I suggest:
"
tmainfo = class(t*form)
[...]
private
widgetrectbefore: rectty;
public
end;
procedure tmainfo.fullscreenexe(const sender: TObject);
begin
if window.windowpos = wp_fullscreen then begin
widgetrect:= widgetrectbefore;
window.windowpos:= wp_normal;
end
else begin
widgetrectbefore:= widgetrect;
window.windowpos:= wp_fullscreen;
end;
end;
"
Martin
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk