defh, defw

The forum for designers and developers.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
staging2000
Posts: 8
Joined: 21. Aug 06, 13:49
Location: Toronto, Canada
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

defh, defw

Postby staging2000 » 27. Aug 06, 00:23

I can't seem to make sense of the defw, defh, usew, useh tags.

I want to have one of my layouts always open to a specific size and position. I still want to be able to size it after opening that layout. The minh/w and the maxh/w are fine but when I specify a defw and defh the layout still reverts to the last size it was in when I switch between the layouts.

Also, your notes sy you can define unique names to usew/h. How do you define a size to that name? Or is that name one of the layouts in the skin.

I have looked at existing skins and they all seem to use the "default" word for the usew/h tags.

An example of what I am trying to achieve is to have a layout named say "medium". When I go to that layout I always want it to start with a width of 800 and height of 500 and centered on the screen but I want to be able to size it either way from there. As I mentioned the min and max tags are fine.

Any help would be great.

Thank You,

Jim
Toronto, Canada

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: defh, defw

Postby Service-Team » 27. Aug 06, 10:16

Last edited by Service-Team on 30. Sep 08, 09:51, edited 1 time in total.

User avatar
staging2000
Posts: 8
Joined: 21. Aug 06, 13:49
Location: Toronto, Canada
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: defh, defw

Postby staging2000 » 27. Aug 06, 13:59

Thank you. This does help some but.....

I think I now understand the usew/h but in your example with the usew="MrSameWidth" how does that width value actually get defined. Can you put in a line that says MrSameWidth="600" so that whenever you define usew="MrSame Width" you will always start withe a 600 pixel wide screen. I see what you mean how to use that value to keep the current default width the same so when you say switch between a small and big display the main application window stays the same.

What I am hoping to do is actually set a specific opening size for a certain layout. I can see in the small player in some of the skins you can set the same value to the min and max and that forces that layout to a fixed size but it then can't be resized. I want to still be able to resize it after opening the layout.

I hope this is not too confusing. I want have a layout that always opens to a specific size regardless of previous settings but I still want to be able to resize that layout after it has opened.

This is not a crucial requirement, it is more to help me understand the huge flexibility in creating skins.

Thank you very much for your patience and help.

Jim
Toronto, Canada

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: defh, defw

Postby Service-Team » 27. Aug 06, 15:19

staging2000 wrote:
> Thank you. This does help some but.....
>
> I think I now understand the usew/h but in your
> example with the usew="MrSameWidth" how
> does that width value actually get defined.

When switching from one layout to another, the width of the old layout is automatically used as the width of the new layout.

If the user has selected the layout "myFineLayout", scales the window to 600px and switch to "someFinerLayout", "someFinerLayout" will be set to 600px, too.

If he then scales the window showing "someFinerLayout" to 800px and switches back to "myFineLayout", the width of "myFineLayout" will be set to 800px, too -- and not to the 600px as used the last time the layout was shown.

> What I am hoping to do is actually set a specific
> opening size for a certain layout.

This is possible using defw and defh - however, if the user scales the window one time, this new size is always remembered. Currently, I cannot imagine a situation where this is not wanted.

> Thank you very much for your patience and help.

No problem, you're welcome!

Best regards,
Your Silverjuke-Team


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Developer Network”