Jump to content
Sign in to follow this  
OmYcroN

Readonly Colors

Recommended Posts

OmYcroN

Hi. I have an edit control set to readonly but i can't change it's background color to white or other color. It's seems the default color it's that of the window. How can i change it ?

Share this post


Link to post
Share on other sites
Jos

Hi. I have an edit control set to readonly but i can't change it's background color to white or other color. It's seems the default color it's that of the window. How can i change it ?

Show some code snippet of what your are doing and isn't working.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Melba23

OmYcroN,

This works fine for me - a bright red read-only edit control:

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

$hGUI = GUICreate("Test", 500, 500)

$hEdit = GUICtrlCreateEdit("Fred", 10, 10, 200, 200, $ES_READONLY)
GUICtrlSetBkColor(-1, 0xFF0000)

GUISetState()

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

WEnd

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
OmYcroN

OmYcroN,

This works fine for me - a bright red read-only edit control:

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

$hGUI = GUICreate("Test", 500, 500)

$hEdit = GUICtrlCreateEdit("Fred", 10, 10, 200, 200, $ES_READONLY)
GUICtrlSetBkColor(-1, 0xFF0000)

GUISetState()

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch

WEnd

M23

Thanks. I was kinda stupid thinking KODA will update the color or something ... My mistake !

I have another problem so i ll not post a new one.

How can i make the vertical scrollbar of an edit control go down every time i send it some text (without using buttons) ? Like when u install windows updates it goes down after the last installed update and no up like the default behavior of the scrollbar from Autoit ?

Share this post


Link to post
Share on other sites
ProgAndy

How can i make the vertical scrollbar of an edit control go down every time i send it some text (without using buttons) ? Like when u install windows updates it goes down after the last installed update and no up like the default behavior of the scrollbar from Autoit ?

just use _GUICtrlEdit_AppendText ^_^ It appends text to the edit and scrolls to the end. Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites
OmYcroN

just use _GUICtrlEdit_AppendText ^_^ It appends text to the edit and scrolls to the end.

Thank You !

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  

×