hello.
I was making a message view like Messenger.
And This is my code.
public void send_message(String data){
Label m = (Label)Message.Instance();
m.Text = data;
M_List.AddChild(m);
if(m.RectSize.x > Message_Width_Limit){
m.SetCustomMinimumSize(new Vector2(Message_Width_Limit, 0));
m.Autowrap = true;
}
t.InterpolateProperty(m, "rect_scale", zero, one, 0.5f, Tween.TransitionType.Back);
t.Start();
}
public void OnVScrollbarMaxValueChanged(){
ScrollVertical = (int)GetVScrollbar().MaxValue;
}
public override void _Ready() {
if (Message == null) Message = GD.Load<PackedScene>("res://Message.tscn");
if (t == null) t = GetNode<Tween>("Message_List/Tween");
if (M_List == null) M_List = GetNode("Message_List");
//GetVScrollbar().Connect("changed", this, "OnVScrollbarMaxValueChanged");
}
When the Object "Message" created on "ScrollViewContainer" inside of "VBoxContainer"(M_List).
"Message" is spawn over the scroll.
So i tried
ScrollVertical = (int)GetVScrollbar().MaxValue;
then Scroll dose follow the "Message" but VScrollBar stop work.
After that line VScrollBar just died and never move and i cant find any debug warnings
GetVScrollbar().Value = (int)GetVScrollbar().MaxValue;
Is also same
can't find what is wrong
help me