how to add scroll in GuiMLTextCtrl at ITorque
by Apppothk · in iTorque 2D · 12/26/2010 (11:53 am) · 2 replies
new GuiMLTextCtrl(viewMaps_content_details1) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiMLTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "43 8";
Extent = "250 150";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiDefaultProfile";
hovertime = "1000";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};i would like to add scroll bar in GuiMlTextCtrl,i try the below code, but the game will dead :( and how to remove the GuiMlTextCtrl background, i will see a rectangular line behind the text new GuiScrollCtrl(){
new GuiMLTextCtrl(viewMaps_content_details1) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiMLTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "43 8";
Extent = "250 150";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiDefaultProfile";
hovertime = "1000";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};About the author
#2
Place the GuiMLTextCtrl inside a GuiScrollCtrl.
To change the background you need to modify the the profile.
profile = "GuiScrollProfile";
singleton GuiControlProfile (GuiScrollProfile)
{
opaque = false;
border = false;
borderColor = "0 255 0";
fillColor = "0 0 0 0";
};
12/02/2013 (7:32 pm)
Just posting this incase someone needs to know how to do this.Place the GuiMLTextCtrl inside a GuiScrollCtrl.
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "0";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "152 616";
extent = "736 108";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiMLTextCtrl() {
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
useURLMouseCursor = "1";
position = "1 1";
extent = "559 14";
minExtent = "8 8";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMLTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
parsetags = "1";
};
};To change the background you need to modify the the profile.
profile = "GuiScrollProfile";
singleton GuiControlProfile (GuiScrollProfile)
{
opaque = false;
border = false;
borderColor = "0 255 0";
fillColor = "0 0 0 0";
};
Torque Owner David Schlabach
Default Studio Name