Author Topic: GuiScrollControl  (Read 837 times)

I'm pretty sure I made a topic back in 2010 and never got a good answer, can someone explain how to work GuiScrollControls and have selectable child controls?

Like on the Admin GUI?

They are pretty easy to use.

add the scroll control.
add a guiControl as the child of the scroll control
then add whatever you want inside the child.

when you make the child control larger than its parent gui scroll control, scrollbars will show up.
That can all be done in the gui editor.

They are pretty easy to use.

add the scroll control.
add a guiControl as the child of the scroll control
then add whatever you want inside the child.

when you make the child control larger than its parent gui scroll control, scrollbars will show up.
That can all be done in the gui editor.

I know how to make it scrollable, but like, being selectable. How do I do that, does it just do it automatically at some point?

I know how to make it scrollable, but like, being selectable. How do I do that, does it just do it automatically at some point?
what do you mean make it selectable?
What do you want to "select"?

and what have you tried thats not working the way you want?

You need to add a GuiTextListCtrl as a child of the scroll control.

Example:
Code: [Select]
               new GuiScrollCtrl() {
                  profile = "GuiScrollProfile";
                  horizSizing = "right";
                  vertSizing = "bottom";
                  position = "0 19";
                  extent = "157 108";
                  minExtent = "8 2";
                  visible = "1";
                  willFirstRespond = "0";
                  hScrollBar = "alwaysOff";
                  vScrollBar = "alwaysOn";
                  constantThumbHeight = "0";
                  childMargin = "0 0";
                  rowHeight = "40";
                  columnWidth = "30";

                  new GuiTextListCtrl(Slayer_Teams_Selector) {
                     profile = "GuiTextListProfile";
                     horizSizing = "right";
                     vertSizing = "bottom";
                     position = "1 1";
                     extent = "140 2";
                     minExtent = "8 2";
                     visible = "1";
                     enumerate = "0";
                     resizeCell = "1";
                     columns = "0";
                     fitParentWidth = "1";
                     clipColumnText = "0";
                  };
               };