[07 Jan 2010] MoveDisplay() problem...

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

[07 Jan 2010] MoveDisplay() problem...

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 07 Jan 2010 01:23:24 -0000

Hi ALL!

I've that code:

Code: Select all

LOCAL DisplayX, DisplayY

DisplayL	= GetAttribute(#DISPLAY, 0, #ATTRWIDTH)	
DisplayH	= GetAttribute(#DISPLAY, 0, #ATTRHEIGHT)	
DisplayX	= GetAttribute(#DISPLAY, 0, #ATTRXPOS)	
DisplayY	= GetAttribute(#DISPLAY, 0, #ATTRYPOS)

DebugPrint(DisplayL, DisplayH, DisplayX , DisplayY)

IF (DisplayL < 420) OR (DisplayH < 200)

	IF DisplayL < 420 THEN DisplayL = 420
	IF DisplayH < 200 THEN DisplayH = 200

ChangeDisplaySize(DisplayL, DisplayH)

MoveDisplay(DisplayX, DisplayY)

EndIF
Why the window (Disaply was sizeable with noscaling parameter on scaling method and placed on start at #CENTER #CENTER position) dont scale itself in the correct position (at X,Y window position) ? It returns centered almost everytime...but sometime was correctly placed...

The routine above was called by SizeWindow event handler...so I've a sizeable window like the wb ones...

Thanks to all! Maybe I've done some stupid mistake...
Simone"Tuxedo"Monsignori, Perugia, ITALY.
PEB
Posts: 591
Joined: Sun Feb 21, 2010 1:28 am

[06 Jan 2010] Re: MoveDisplay() problem...

Post by PEB »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 6 Jan 2010 18:07:08 -0800 (PST)

I'm really not sure why you need code like this at all for resizing your display, but you could try this instead:

Code: Select all

ChangeDisplaySize(DisplayL, DisplayH, {X=#KEEPPOSITION, Y=#KEEPPOSITION})
And delete your MoveDisplay() line.
User avatar
Tuxedo
Posts: 355
Joined: Sun Feb 14, 2010 12:41 pm

[07 Jan 2010] Re: MoveDisplay() problem...

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 07 Jan 2010 12:17:15 -0000

Hi!
I'm really not sure why you need code like this at all for resizing your display, but you could try this instead:

ChangeDisplaySize(DisplayL, DisplayH, {X=#KEEPPOSITION, Y=#KEEPPOSITION})
Thanks! It works now! However I wonder why it dont works in the way I made it... Excusme for stupid question like that...I have MUCH to learn... However I need it ot refresh my window contents when its resized and to prevent it to be smaller that IF...THEN values...or maybe hollywood supports it natively in some way? I dont see it in the guide...

PS You can see the results in next version of LoView...

Simone
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Locked