Sign in to follow this  
Followers 0
charvi

How to remove the input frame

3 posts in this topic

I have here a little program with 2 inputs. I would like to remove the white frame around the input field.

How do I do that?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <GuiMenu.au3>
#include <GuiToolBar.au3>
#include <GuiComboBoxEx.au3>
#include <Array.au3>
#include <Constants.au3>


$hGui = GUICreate("My Books", 600, 500, 50, 50)
GUISetBkColor(0xd4d0c8, $hGui)
GUISetState()

GUISetFont(12, 400, 0, "Tahoma")

GUICtrlCreateLabel("Book Title:", 100, 102, 200, 25)
$Input1 = GUICtrlCreateInput("I, Robot", 220, 100, 270, 25)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xffffff)

GUICtrlCreateLabel("Author:", 100, 132, 200, 25)
$Input2 = GUICtrlCreateInput("Isaac Asimov", 220, 130, 270, 25)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xffffff)


While 1
  $event = GUIGetMsg()

  Select
  Case $event = $GUI_EVENT_CLOSE
      $i1=GUICtrlRead($input1)
      $i2=GUICtrlRead($input2)
      msgbox(1,"Variables",$i1 & @lf & $i2)
      ExitLoop
  EndSelect
WEnd

Share this post


Link to post
Share on other sites



I have here a little program with 2 inputs. I would like to remove the white frame around the input field.

How do I do that?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <GuiMenu.au3>
#include <GuiToolBar.au3>
#include <GuiComboBoxEx.au3>
#include <Array.au3>
#include <Constants.au3>


$hGui = GUICreate("My Books", 600, 500, 50, 50)
GUISetBkColor(0xd4d0c8, $hGui)
GUISetState()

GUISetFont(12, 400, 0, "Tahoma")

GUICtrlCreateLabel("Book Title:", 100, 102, 200, 25)
$Input1 = GUICtrlCreateInput("I, Robot", 220, 100, 270, 25)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xffffff)

GUICtrlCreateLabel("Author:", 100, 132, 200, 25)
$Input2 = GUICtrlCreateInput("Isaac Asimov", 220, 130, 270, 25)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xffffff)


While 1
  $event = GUIGetMsg()

  Select
  Case $event = $GUI_EVENT_CLOSE
      $i1=GUICtrlRead($input1)
      $i2=GUICtrlRead($input2)
      msgbox(1,"Variables",$i1 & @lf & $i2)
      ExitLoop
  EndSelect
WEnd
Unfortunately I don't see a white border when I run it, but maybe one of these will do what you want.

$Input1 = GUICtrlCreateInput("I, Robot", 220, 100, 270, 25,-1,0)
;or
$Input1 = GUICtrlCreateInput("I, Robot", 220, 100, 270, 25, BitOR($ES_AUTOHSCROLL,$WS_BORDER),0)

If you use Koda then designing GUIs, and working out this sort of thing, is very much easier and faster.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Thank you martin, your both solutions are correct. It removes the white lines (= the border). If you don't see the white border around the input, I think it is because I am using Windows Vista with the standard theme; when I tested my program on Windows 2000, the input is in a sunken frame. In fact, I had to ask "how to make a flat input" instead.

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