Sign in to follow this  
Followers 0
Hypertrophy

hi,possible to resize edit or input

10 posts in this topic

hello, my first post i've wondering if there is way to make control like edit that can be resize inside window. example: edit is inside child window and if take the corners of window and resize the edit will reisize with it. anyone know if there example scripts like this that would be great help.

Share this post


Link to post
Share on other sites



hello, my first post i've wondering if there is way to make control like edit that can be resize inside window. example: edit is inside child window and if take the corners of window and resize the edit will reisize with it. anyone know if there example scripts like this that would be great help.

AutoIt Help File => $WS_SIZEBOX

Share this post


Link to post
Share on other sites

thanks you. i entered that into my code and it correctly re-sizes the edit control but not the window. code below to help identify my problem

; Code ;
; Created by coder09 ;

#include <GuiConstantsEx.au3>
#include <GuiEdit.au3>
#include <WindowsConstants.au3>

Global $lastdragIP = -1
Dim $hInput_GUI[50], $Input[50]

$hGUI = GUICreate("Re-size edit control", 300, 200)

$button = GUICtrlCreateButton("", 50, 50, 50, 20)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $button
                If $lastdragIP < 49 Then
                    $lastdragIP += 1
                    createNextdragIP($lastdragIP)
                EndIf
    EndSwitch
WEnd

Func createNextdragIP($nw)
    $start = WinGetPos($hgui)
    $hInput_GUI[$nw] = GUICreate("", 120, 22, 100, 100, $WS_POPUP, $WS_EX_TOOLWINDOW)
    GUICtrlSetStyle(-1, $WS_SIZEBOX)
    $Input[$nw] = GUICtrlCreateEdit("", 0, 0, 120, 22, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN))
    GUICtrlSetStyle(-1, $WS_SIZEBOX)
    GUISetState()    
EndFunc

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

thanks you. i entered that into my code and it correctly re-sizes the edit control but not the window. code below to help identify my problem

$hInput_GUI[$nw] = GUICreate("", 120, 22, 100, 100, BitOR($WS_POPUP, $WS_SIZEBOX), $WS_EX_TOOLWINDOW)
$Input[$nw] = GUICtrlCreateEdit("", 0, 0, 120, 22, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL))
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)

Also, your code will not work correctly. You must arrange your own loop for createNextdragIP().

^_^

Edited by Yashied

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

thank you very much good sir. i appreciate your help.

Edited by coder09

Share this post


Link to post
Share on other sites

anyway to remove scrollbars?

Share this post


Link to post
Share on other sites

hello anyone understand how remove scrollbars? thanks you.

Share this post


Link to post
Share on other sites

don't see scrollbars in your code.. can you post the image? or just say for what GUI control you don't want scrollbar

Share this post


Link to post
Share on other sites

yes thank you ive understand how remove scrollbars

$hInput_GUI[$nw] = GUICreate("", 120, 22, 100, 100, BitOR($WS_POPUP, $WS_SIZEBOX), $WS_EX_TOOLWINDOW)
$Input[$nw] = GUICtrlCreateEdit("", 0, 0, 120, 22, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL))
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)

take out $WS_VSCROLL, $WS_HSCROLL

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