Sie sind nicht angemeldet.

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

1

Dienstag, 15. Mai 2012, 01:55

autosize with width percentage

Hi,

i have a textfield with :
width="30%"
wordwrap="true"
autosize="center"

when i resize brouwser the text lines go nice but the backbround (color), same textfield, doesn't autosizes along in height.

As you can imagine when you make the brouwser screen smaller the 30% gets smaller and the textlins get shorter, and more lines.. That's ok.
But the height of the background(color should also get more higher.. works not.

Is there a way to achieve that? Or what is wrong?

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.....
keep="true"
 	        visible="false" enabled="true" handcursor="true" capture="true" 
 	        zorder="30"
 	        alpha="0.7" blendmode="normal"
 	        smoothing="true"
 	        align="lefttop" edge=""
 	        x="20" y="100"
	      
			width="30%"
	        autosize="center" 
			wordwrap="true"
	        background="true"
	        backgroundcolor="0xCCCCCC"  
	        blur="0"
			border="false"
	        bordercolor=""
	        borderwidth="0"
	        css="data:optionscss"
	        glow="0"
	        glowcolor=""
	        html="data:html_options_txt"
	        roundedge="0"
	        selectable="false"
	        shadow="0" 
	        textblur="0"
	        textglow="0"
	        textglowcolor=""
	        textshadow=""
			parent="STAGE"



*confused*

Tuur *thumbsup*

2

Dienstag, 15. Mai 2012, 08:24

Hi Tuur *smile*

The textfield does not work very well with autosize and background. I never even managed it to get the background-width get set automatically when using the textfield-plugin for hotspot-texts. I suggest to use a separate plugin as background!

Best regards
Nupsi

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

3

Dienstag, 15. Mai 2012, 13:23

He Nupsi,

That could be asolution but far from ideal..
Is there another solution or will thos be fixed in a next release?
Klaus?

Tuur *thumbsup*

4

Freitag, 18. Mai 2012, 05:51

Hi!
the solution.
Make style for textfield plugin with attributes you need.
And remove and add plugin each time onresize.
for example

Quellcode

1
2
3
4
5
6
7
8
9
10
<style name="my_text" url="textfield.swf" html="[p]Bla bla[/p]" ..... />
<events onresize="
	if(plugin[my_text ].loaded,
		removeplugin(my_text ); 

	);

	addplugin(my_text );
	plugin[text].loadstyle(my_text );
"/>

It's tested and works.

Hope it help
Andrey *thumbup*
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Freitag, 18. Mai 2012, 10:44

Smart!
Gonna try that

Thanks Andrey!

Tuur *thumbsup*