Sign in to follow this  
Followers 0
Glowshi

Selectable label or frameless input box?

7 posts in this topic

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

Share this post


Link to post
Share on other sites



i guess it's not possible.

nevermind then

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

 

Share this post


Link to post
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 ]---

Share this post


Link to post
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.

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