question about widget

nevarim

13-10-2010 21:35:33

hi all again

i must make a chat box resizable on vertical line

which widget or property has to be used?


thanks again

Altren

14-10-2010 03:22:41

You should use Window widget and create skin for it, skin should contain subwidget, that have property
<Property key="Scale" value = "0 0 0 1"/>
And then create child widget - Edit.

nevarim

14-10-2010 10:25:49

this evening i'll try it :D


thanks

nevarim

15-10-2010 14:18:19

ok i create a new window, but when i create it the window is not a child of background, but a stand alone how can i do for make as a child of staicimage on background as other button?

nevarim

15-10-2010 18:16:11

resolution found

child=true

nevarim

15-10-2010 18:18:17

<Resource type="ResourceSkin" name = "bc_chat" size = "68 49" texture = "#{bc_core_Texture}" >
<Property key="ToStick" value = "true" />
<Property key="Scale" value = "0 0 0 1"/>
<Child type="Button" skin="WindowCaptionDisable" offset = "0 0 68 28" align = "HStretch Top" name = "bc_Caption">
<Property key="Scale" value = "1 1 0 0"/>
</Child>
<Child type="Widget" skin="DefaultClient" offset = "4 31 58 12" align = "Stretch" name = "bc_Client"/>
<BasisSkin type="SubSkin" offset = "0 28 4 3" align = "Left Top">
<State name="normal" offset = "384 173 4 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "4 28 58 3" align = "HStretch Top">
<State name="normal" offset = "390 173 3 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 28 6 3" align = "Right Top">
<State name="normal" offset = "401 173 6 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "0 31 4 12" align = "Left VStretch">
<State name="normal" offset = "384 176 4 12"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 31 6 12" align = "Right VStretch">
<State name="normal" offset = "401 176 6 12"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "0 43 4 6" align = "Left Bottom">
<State name="normal" offset = "384 188 4 6"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "4 43 58 6" align = "HStretch Bottom">
<State name="normal" offset = "390 188 3 6"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 43 6 6" align = "Right Bottom">
<State name="normal" offset = "401 188 6 6"/>
</BasisSkin>
</Resource>



i set code so but in teest mode i cant resize this widget

Altren

16-10-2010 03:36:08

No, Scale should be property of child skin widget (for example bc_Caption). Replace
<Property key="Scale" value = "1 1 0 0"/>with<Property key="Scale" value = "0 0 0 1"/>

nevarim

16-10-2010 08:30:39

making this if i drag caption i cannot change height in test mode


<Resource type="ResourceSkin" name = "bc_chat" size = "68 49" texture = "#{bc_core_Texture}" >
<Property key="ToStick" value = "true" />
<Child type="Button" skin="WindowCaptionDisable" offset = "0 0 68 28" align = "HStretch Top" name = "bc_Caption">
<Property key="Scale" value = "0 0 0 1"/>
</Child>
<Child type="Widget" skin="DefaultClient" offset = "4 31 58 12" align = "Stretch" name = "bc_Client"/>
<BasisSkin type="SubSkin" offset = "0 28 4 3" align = "Left Top">
<State name="normal" offset = "384 173 4 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "4 28 58 3" align = "HStretch Top">
<State name="normal" offset = "390 173 3 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 28 6 3" align = "Right Top">
<State name="normal" offset = "401 173 6 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "0 31 4 12" align = "Left VStretch">
<State name="normal" offset = "384 176 4 12"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 31 6 12" align = "Right VStretch">
<State name="normal" offset = "401 176 6 12"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "0 43 4 6" align = "Left Bottom">
<State name="normal" offset = "384 188 4 6"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "4 43 58 6" align = "HStretch Bottom">
<State name="normal" offset = "390 188 3 6"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 43 6 6" align = "Right Bottom">
<State name="normal" offset = "401 188 6 6"/>
</BasisSkin>
</Resource>

Altren

16-10-2010 09:44:40

<Child type="Button" skin="WindowCaptionDisable" offset = "0 0 68 28" align = "HStretch Top" name = "Action">
<Property key="Scale" value = "0 1 0 -1"/>
</Child>
Name of subwidget must be either "Caption" or "Action". Also I forgot that you should use Scale "0 1 0 -1", because you resize with top, but not bottom border.

nevarim

16-10-2010 15:46:24

ok problem solved, thamks :D

another problem on this, the widget edit is needed for write the words that are listed on the chat after, but there is a widget made for take list of these rows?


sorry for the newbee's questions :)

nevarim

08-11-2010 09:34:49

hi have another question on window, can i set a minimum height for the resize on window?

and with the widget edit on it how can i set a list for the work write insede widget edit?


thanks for the patience

Nevarim

Altren

08-11-2010 14:29:45

Use window method setMinMax if you use MyGUI 3.0 or setMinSize / setMaxSize if you use version from trunk.
and with the widget edit on it how can i set a list for the work write insede widget edit?Er, what? Are you talking about Edit widget size?

nevarim

08-11-2010 16:42:13

working with a chat
if i write into a box and i press enter the word written inside box appear in a list of phrases

what widgets i must use?

Thanks

Nevarim

Altren

08-11-2010 18:44:55

Two Edit widgets, one with multi-line property enabled.

nevarim

09-11-2010 13:07:42

Use window method setMinMax if you use MyGUI 3.0 or setMinSize / setMaxSize if you use version from trunk.

and for set it into widgety properties isn't possible?

Nevarim

Altren

09-11-2010 13:46:46

Window_MinMax (MyGUI 3.0) or MinSize/MaxSize (newer versions) property.

nevarim

09-11-2010 14:25:04

work perfectly


thanks

Nevarim

nevarim

12-11-2010 12:45:14

hi again

where i can find minsize and maxsize properties documentation?

thanks

Nevarim

Altren

12-11-2010 12:54:04

Look at setMinSize/setMaxSize interface. Both take two integers as minimum and maximum possible size for window.

nevarim

12-11-2010 13:18:39

integer are precentage or pixel?

Altren

12-11-2010 17:48:27

Pixels.