Sign in to follow this  
Followers 0
232showtime

space between GUICtrlCreateButton

2 posts in this topic

Hi need some help with the space between two buttons, if I ran the script the space between two buttons is gone and when I maximized the gui, space between two button is showing,

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$hGUI1 = GUICreate("Test", 1090, 800, 200, 200, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP, $WS_HSCROLL, $WS_VSCROLL))
$TopRight1 = GUICtrlCreateButton("Test1", 800, 25, 70, 50)
$TopRight2 = GUICtrlCreateButton("Test2", 850, 25, 70, 50)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

this is the first time I encounter this problem.


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites



Use

Opt("GUIResizeMode", $GUI_DOCKALL);or
;Opt("GUIResizeMode", $GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)

BTW.: the second button overlapping first button his pos should be corrected to 870.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • John C.
      By John C.
      ;Adding $BS_DEFPUSHBUTTON doesn't work
              $idCopy_Data = GUICtrlCreateButton("Copy Data Only", $iButtonWidth_2, $aiGUISize[1] - $iButtonMargin, $iButtonWidth_2, 20, $BS_DEFPUSHBUTTON)
      ;Adding these two lines doesn't work either
               Local $aAccelKeys[2][2] = [["{enter}", $idCopy_Data], ["^{enter}", $idCopy_ID]]
              GUISetAccelerators($aAccelKeys)
       
    • JuanFelipe
      By JuanFelipe
      Hi friends, I need help with the process, I have a button to initiate a code but do not know how to configure it to be the button to start the process, thank you very much for your help.
      Here I leave the code to see if I have to change some part.
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\juan.caballeron\desktop\ \programacion\autoit\capturas\koda_1.7.3.0\forms\grabar capturas.kxf $Form1_1 = GUICreate("WhiteSnake", 655, 487, 192, 124) GUISetIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\Avatar on ice-256.ico", -1) GUISetBkColor(0xC8C8C8) $hechos = GUICtrlCreateGroup("Hechos", 16, 32, 385, 169) GUICtrlSetColor(-1, 0x000000) $box_fechah = GUICtrlCreateInput("", 112, 72, 81, 21) GUICtrlSetLimit(-1, 10) $box_hora = GUICtrlCreateInput("", 112, 104, 81, 21) GUICtrlSetLimit(-1, 5) $box_fechaf = GUICtrlCreateInput("", 112, 136, 81, 21) GUICtrlSetLimit(-1, 10) $box_fte = GUICtrlCreateInput("", 112, 168, 81, 21) GUICtrlSetLimit(-1, 5) $Label3 = GUICtrlCreateLabel("Fecha Hecho:", 24, 72, 72, 17) $Label4 = GUICtrlCreateLabel("Hora:", 24, 104, 30, 17) $Label5 = GUICtrlCreateLabel("Fecha Fuente:", 24, 136, 73, 17) $Label6 = GUICtrlCreateLabel("Nro. Fuente:", 24, 168, 63, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $personas = GUICtrlCreateGroup("Datos de la Persona", 16, 224, 585, 185) $Label1 = GUICtrlCreateLabel("Tipo Identificación:", 32, 256, 94, 17) $Label2 = GUICtrlCreateLabel("No. Documento:", 32, 280, 82, 17) $Label7 = GUICtrlCreateLabel("Apellidos", 32, 304, 46, 17) $Label8 = GUICtrlCreateLabel("Nombres", 32, 328, 46, 17) $Label9 = GUICtrlCreateLabel("Sexo", 32, 352, 28, 17) $Label10 = GUICtrlCreateLabel("Fecha Nacimiento", 32, 376, 90, 17) $Combo1 = GUICtrlCreateCombo("Selección", 128, 256, 193, 21) $Combo1 = GUICtrlSetData(-1, "Tarjeta de Identidad|Cédula") GUICtrlSetLimit(-1, 1) $documento = GUICtrlCreateInput("", 128, 280, 193, 21) $apellidos = GUICtrlCreateInput("", 128, 304, 377, 21) $nombres = GUICtrlCreateInput("", 128, 328, 377, 21) $Combo2 = GUICtrlCreateCombo("Selección", 128, 352, 121, 21) $Combo2 = GUICtrlSetData(-1, "Masculino|Femenino") GUICtrlSetLimit(-1, 1) $fecha_naci = GUICtrlCreateInput("", 128, 376, 121, 21) GUICtrlSetLimit(-1, 10) GUICtrlCreateGroup("", -99, -99, 1, 1) $datoscap = GUICtrlCreateGroup("Datos Capturas", 456, 32, 145, 169) $Label11 = GUICtrlCreateLabel("Label11", 472, 56, 42, 17) $Label12 = GUICtrlCreateLabel("Label12", 472, 80, 42, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Titulo = GUICtrlCreateLabel("PROCESO PARA GRABAR CAPTURAS EN EL SIEDCO.", 175, 8, 277, 17, $SS_CENTER) GUICtrlSetCursor (-1, 3) $Progress1 = GUICtrlCreateProgress(448, 432, 169, 9) GUICtrlSetCursor (-1, 15) $creador = GUICtrlCreateLabel("By WhiteSnake", 8, 440, 78, 17) GUICtrlSetColor(-1, 0xFF0000) $Icon1 = GUICtrlCreateIcon("C:\Users\juan.caballeron\Desktop\ \Programacion\Autoit\Capturas\koda_1.7.3.0\iconos\1249549841170809086.ico", -1, 88, 432, 32, 32) $iniciar = GUICtrlCreateButton("INICIAR PROCESO", 296, 424, 145, 25) GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd  
      I just need to know how to do that when you click the $iniciar start any process.
    • weirddave
      By weirddave
      I have created a Gui with a number of GUICtrlCreateButton()
      When I click on them with the mouse, the response by my script is very slow (1-2 secs), but if I navigate the buttons using the arrow keys and activate them with the Enter key, the response is fairly instant. Has anyone else seen this, and perhaps solved it?
      Dave
    • nitekram
      By nitekram
      NO code, but a question...what is your method for adding a control in an already created GUI.

      Say you created your GUI, and then decided that there was something missing, and you wanted to put it in the middle or where ever...you have to move all the controls after it and it is a pain.

      Does anyone have an easy method, or the method you choose to begin with so you do not have to worry about this coming up in the future?
    • JonBMN
      By JonBMN
      I'm trying to make an up and down arrow like this " ^ ", but since there is no down caret on the keyboard I'm resorting to trying to figure out ways to get that Caret upside down.

      Has anyone tried doing this for a button so that it looks like an up and down array? This button will be used for sorting.

      I've tried looking through Unicode to see if I could do it and no luck :/. Any help would be much appreciated.