Sign in to follow this  
Followers 0

$ES_READONLY + Input

4 posts in this topic

Posted (edited)

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

Share this post


Link to post
Share on other sites



Posted

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

Share this post


Link to post
Share on other sites

Posted

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! :)

Share this post


Link to post
Share on other sites

Posted

Thanks friends. Should have known better.

Aloha

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