AutoHotkey Community

It is currently May 26th, 2012, 11:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: August 24th, 2005, 11:52 pm 
Offline

Joined: February 16th, 2005, 5:32 pm
Posts: 44
Is it possible to have a read only Edit box with white background (well, other than setting the whole background white)? Also, when I change the text in the Edit control via GuiControl it is always completely selected? :?

Hm, what do you use to display a lot of text? Even if you are happy with a gray-backgrounded readonly Edit control, there's still the problem, that the text it selected after posting it to the control and also, that is it scrolled down. Well, you could send ^{Home} for that, but it is really the only way?

Well, I also did it with ControlSetText which yields unselected text which is not scrolled down. But that seems an eerie way to me. Like if you go from the kitchen to the living room by leaving through the kitchen room window and reentering through the living room window. :lol:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 25th, 2005, 1:05 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
delta wrote:
Is it possible to have a read only Edit box with white background (well, other than setting the whole background white)?
I don't know of any easy way, but it's on the to-do list to allow custom background colors for individual controls.

Quote:
Also, when I change the text in the Edit control via GuiControl it is always completely selected?
I think the select-all behavior results from navigating/focusing the control rather than using GuiControl. I tested GuiControl to insert new text while an Edit has focus and it didn't cause select-all. But I could be missing something.

Quote:
...the text it selected after posting it to the control and also, that is it scrolled down. Well, you could send ^{Home} for that, but it is really the only way?
There are a lot of messages you can send to an Edit control and I'm not well versed in them yet. In case you need it, here is one that sets the caret position to the top of the control:

Gui +LastFound
SendMessage, 0xB1, 0, 0, Edit1 ; 0xB1 is EM_SETSEL. The first 0 is selection's start pos. and the second is end pos.

Thanks for this feedback about the Edit control. At the very least, I think the documentation needs to be improved about how to set selections, caret positions, etc. But some more built-in functionality would probably be good too.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2005, 2:35 pm 
Offline

Joined: February 16th, 2005, 5:32 pm
Posts: 44
Thanks, I was beginning to wonder about how to set the caret position! :wink:

I'm looking forward to new versions for more customization. :) Hm, will it ever be possible to change the font for single words in ReadOnly edit boxes? Or at least the style or color... something like "After all this <b>is</b> a bold word."? And can this also be extended to tool tips?

But any way: You are doing a great job, Chris! :D
(Has to be said every now and then!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 26th, 2005, 2:12 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
delta wrote:
...will it ever be possible to change the font for single words in ReadOnly edit boxes?
I don't think so because Edit controls (which are a built-in feature of the OS) don't support it. However, there will probably be a RichEdit control someday, which might offer these capabilities.

Quote:
And can this also be extended to tool tips?
It seems unlikely because a ToolTip's appearance is controlled and standardized by the OS.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 26th, 2008, 9:36 pm 
Offline

Joined: April 17th, 2007, 1:37 pm
Posts: 761
Location: Florida
delta wrote:
Is it possible to have a read only Edit box with white background (well, other than setting the whole background white)?

Bump... Is this possible? Custom control colors seem to be overridden by +Readonly... I'm using a light grey color for my background as a workaround, but the white edit box (without +Readonly) looks much nicer on a grey background.

_________________
[Join IRC!]
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], JSLover, Kirtman, Leef_me, Miguel, XstatyK and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group