Jump to content

Selectable label or frameless input box?


Glowshi
 Share

Recommended Posts

Yay, this is my first post!

I'm curious if there is any way to create a label with selectable text or an input or edit box with no frame? I basically just need some text with nothing around it that people can copy and paste.

I'm also curious about controlling the order of overlapping controls, say I have a group and it overlaps an edit box and I want the group frame to always be on top, is there any way to control which controls are in front of others?

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Creating a label with selectable text:

#include <GUIConstants.au3>
$Form2 = GUICreate("AForm1", 634, 450, 197, 116)
$Input1 = GUICtrlCreateInput("AInput1", 8, 8, 121, 21, $ES_READONLY); $ES_READONLY = stops the text being changed
GUICtrlSetBkColor($Input1,0xD4D0C8);0xD4D0C8 = same colour as form
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

As for overlapping, I'm sure that the order the controls are created does this automatically. E.g. if you create the group after you create the edit box, then it should overlap.

----[ SandyD ]---
Link to comment
Share on other sites

#include <GUIConstants.au3>
$Form2 = GUICreate("AForm1", 634, 450, 197, 116)
$Input1 = GUICtrlCreateInput("AInput1", 8, 8, 121, 21, -1, $WS_EX_TRANSPARENT )
GUICtrlSetBkColor($Input1,0xD4D0C8);0xD4D0C8 = same colour as form
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
  ;;;;;;;
    EndSelect
WEnd
Exit

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

@Nuffilein805:

I read from the post that he only wanted to copy and paste the text in the input box. I didn't realise that he wanted to write to it too. (Hence the reason for the $ES_READONLY style).

I'm curious if there is any way to create a label with selectable text or an input or edit box with no frame? I basically just need some text with nothing around it that people can copy and paste.

----[ SandyD ]---
Link to comment
Share on other sites

@Nuffilein805:

I read from the post that he only wanted to copy and paste the text in the input box. I didn't realise that he wanted to write to it too. (Hence the reason for the $ES_READONLY style).

Yeah, i meant copy from the lable and paste somewhere else. i'll give the input box thing a try. thanks.

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...