Jump to content

$ES_READONLY + Input


Zilee
 Share

Recommended Posts

Sup guys. I insert a long path inside a ctrl input, I don't want to let the users edit the path once it's placed inside the edit so I added the readonly attribute.

Only issue is, I can't use the mouse to select long strings, the hidden text simply doesn't move along. Keyboard arrows and HOME/END key's aren't doing much good either. I can't make my input longer since my window has a size I don't want to change.

Edited by Zilee
Link to comment
Share on other sites

This is working for me:

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>

$Form1 = GUICreate("TEST", 215, 88)
$Label = GUICtrlCreateLabel("Path", 32, 32, 26, 17)
$Input = GUICtrlCreateInput("c:\ProgramData\Microsoft\Search\Data\Applications\Windows\Projects\SystemIndex\SecStore\", 64, 30, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY))
GUISetState(@SW_SHOW)


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

I can select either with the mouse or with the keyboard the path in the input box.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

UEZ, however this doesn't:

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>

$Form1 = GUICreate("TEST", 215, 88)
$Label = GUICtrlCreateLabel("Path", 32, 32, 26, 17)
$Input = GUICtrlCreateInput("c:\ProgramData\Microsoft\Search\Data\Applications\Windows\Projects\SystemIndex\SecStore\", 64, 30, 121, 21, $ES_READONLY)
GUISetState(@SW_SHOW)


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

@OP, LOL! :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...