Author Topic: GUI won't stop resizing to fit the whole window  (Read 1259 times)

I keep setting to the extent 480 240 but it keeps resizing to the size of the whole window.
Code: [Select]
//--- OBJECT WRITE BEGIN ---
new GuiWindowCtrl(quickchat) {
   profile = "GuiWindowProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "0 0";
   extent = "420 280";
   minExtent = "420 280";
   enabled = "1";
   visible = "1";
   clipToParent = "1";
   text = "Quickchat";
   maxLength = "255";
   resizeWidth = "0";
   resizeHeight = "0";
   canMove = "1";
   canClose = "1";
   canMinimize = "0";
   canMaximize = "0";
   minSize = "50 50";
   closeCommand = "canvas.popDialog(quickchat);";

   new GuiTextEditCtrl(QCOne) {
      profile = "GuiTextEditProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "30 70";
      extent = "350 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      maxLength = "255";
      historySize = "0";
      password = "1";
      tabComplete = "0";
      sinkAllKeyEvents = "0";
   };
   new GuiTextEditCtrl(QCTwo) {
      profile = "GuiTextEditProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "30 130";
      extent = "350 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      maxLength = "255";
      historySize = "0";
      password = "0";
      tabComplete = "0";
      sinkAllKeyEvents = "0";
   };
   new GuiTextEditCtrl(QCThree) {
      profile = "GuiTextEditProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "30 190";
      extent = "350 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      maxLength = "255";
      historySize = "0";
      password = "0";
      tabComplete = "0";
      sinkAllKeyEvents = "0";
   };
   new GuiTextCtrl(QCText1) {
      profile = "GuiTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "30 50";
      extent = "57 18";
      minExtent = "8 18";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "Chat Msg 1:";
      maxLength = "255";
   };
   new GuiTextCtrl(QCText2) {
      profile = "GuiTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "30 110";
      extent = "57 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "Chat Msg 2:";
      maxLength = "255";
   };
   new GuiTextCtrl(QCText3) {
      profile = "GuiTextProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "30 170";
      extent = "57 18";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "Chat Msg 3:";
      maxLength = "255";
   };
   new GuiBitmapButtonCtrl(QCDone) {
      profile = "GuiDefaultProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "135 220";
      extent = "153 30";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "                      Done";
      groupNum = "-1";
      buttonType = "PushButton";
      bitmap = "base/client/ui/button1";
      lockAspectRatio = "0";
      alignLeft = "0";
      alignTop = "0";
      overflowImage = "0";
      mKeepCached = "0";
      mColor = "255 255 255 255";
   };
};
//--- OBJECT WRITE END ---

Parent the window to a guicontrol.

Parent the window to a guicontrol.
how
EDIT: wait is this good?
Code: [Select]
new GuiControl() {
      profile = "GuiDefaultProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "0 0";
      extent = "420 280";
      minExtent = "8 2";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
   new GuiWindowCtrl(quickchat) {
      profile = "GuiWindowProfile";
      horizSizing = "right";
      vertSizing = "bottom";
      position = "0 0";
      extent = "420 280";
      minExtent = "420 280";
      enabled = "1";
      visible = "1";
      clipToParent = "1";
      text = "Quickchat";
      maxLength = "255";
      resizeWidth = "0";
      resizeHeight = "0";
      canMove = "1";
      canClose = "1";
      canMinimize = "0";
      canMaximize = "0";
      minSize = "50 50";
      closeCommand = "canvas.popDialog(quickchat);";

      new GuiTextEditCtrl(QCOne) {
         profile = "GuiTextEditProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "30 70";
         extent = "350 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         maxLength = "255";
         historySize = "0";
         password = "1";
         tabComplete = "0";
         sinkAllKeyEvents = "0";
      };
      new GuiTextEditCtrl(QCTwo) {
         profile = "GuiTextEditProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "30 130";
         extent = "350 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         maxLength = "255";
         historySize = "0";
         password = "0";
         tabComplete = "0";
         sinkAllKeyEvents = "0";
      };
      new GuiTextEditCtrl(QCThree) {
         profile = "GuiTextEditProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "30 190";
         extent = "350 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         maxLength = "255";
         historySize = "0";
         password = "0";
         tabComplete = "0";
         sinkAllKeyEvents = "0";
      };
      new GuiTextCtrl(QCText1) {
         profile = "GuiTextProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "30 50";
         extent = "57 18";
         minExtent = "8 18";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         text = "Chat Msg 1:";
         maxLength = "255";
      };
      new GuiTextCtrl(QCText2) {
         profile = "GuiTextProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "30 110";
         extent = "57 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         text = "Chat Msg 2:";
         maxLength = "255";
      };
      new GuiTextCtrl(QCText3) {
         profile = "GuiTextProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "30 170";
         extent = "57 18";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         text = "Chat Msg 3:";
         maxLength = "255";
      };
      new GuiBitmapButtonCtrl(QCDone) {
         profile = "GuiDefaultProfile";
         horizSizing = "right";
         vertSizing = "bottom";
         position = "135 220";
         extent = "153 30";
         minExtent = "8 2";
         enabled = "1";
         visible = "1";
         clipToParent = "1";
         text = "                      Done";
         groupNum = "-1";
         buttonType = "PushButton";
         bitmap = "base/client/ui/button1";
         lockAspectRatio = "0";
         alignLeft = "0";
         alignTop = "0";
         overflowImage = "0";
         mKeepCached = "0";
         mColor = "255 255 255 255";
      };
   };   
};
//--- OBJECT WRITE END ---
because it still does't work
« Last Edit: April 08, 2013, 05:48:26 PM by Aide33 »


hello?
Give people a while to think about the code you have. This may be a problem that is hard to solve.

Right, first, you shouldn't just parent it to ControlGUI, it should be like that when you create a new GUI, so that it doesn't forget things up.

Try and use this for a step by step tutorial, because if I wasn't 100 miles away from my workstation then I'd be able to help you.