GUI mit Frame wird unleserlich bei Resize mit AutoXYWH Topic is solved

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

pramach
Posts: 54
Joined: 24 Jan 2018, 08:20

GUI mit Frame wird unleserlich bei Resize mit AutoXYWH

31 Jan 2018, 10:40

Hallo

ich habe eine Zusatzfrage zu :
https://autohotkey.com/boards/viewtopic ... 9&start=80

Soweit klappt das letzte Script (Stand heute, Seite 5) ganz gut.
Ausser ich verwende einen Frame.
Als Beispiel das um einen Frame mit inhalt erweiterte von Post #1 des originalen Threads.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#include AutoXYWH.ahk

Gui, +Resize
Gui Add, Text, x20 y10 w120 h21 vtsf 0x8
Gui Add, Text, x25 y14 h13 vts, % A_YYYY . A_MM . A_DD . A_Hour . A_Min . A_Sec
Gui, Add, Edit, ve1 w150 h100
Gui, Add, Button, vb1 gResize, Resize
Gui, Show
return

Resize:
	GuiControl, Move, e1, h50
	AutoXYWH("reset") ; Needs to reset if you changed the Control size manually.
return

GuiEscape:
GuiClose:
	ExitApp

GuiSize:
	If (A_EventInfo = 1) ; The window has been minimized.
		Return
	AutoXYWH("x", "tsf")
	AutoXYWH("x", "ts")
	AutoXYWH("wh", "e1")
	AutoXYWH("y", "b1")
return
Der Inhalt des Frames ist vor dem Resize einwandfrei lesbar, nach dem Resize nicht mehr.

Hat jemand eine Idee wie das wieder lesbar gemacht werden könnte ?
pramach
Posts: 54
Joined: 24 Jan 2018, 08:20

Re: GUI mit Frame wird unleserlich bei Resize mit AutoXYWH  Topic is solved

31 Jan 2018, 10:54

Problem erledigt.
Wenn ich mein Feld mit einem Timer update, dann wird es beim aktualisieren wieder lesbar.
just me
Posts: 9451
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: GUI mit Frame wird unleserlich bei Resize mit AutoXYWH

01 Feb 2018, 09:40

Alternative, flackert allerdings ein wenig:

Code: Select all

GuiSize:
	If (A_EventInfo = 1) ; The window has been minimized.
		Return
	AutoXYWH("x", "tsf")
	AutoXYWH("x*", "ts") ; AutoXYWH: add a '*' to DimSize to 'MoveDraw' the controls rather then just 'Move'
	AutoXYWH("wh", "e1")
	AutoXYWH("y", "b1")
return
pramach
Posts: 54
Joined: 24 Jan 2018, 08:20

Re: GUI mit Frame wird unleserlich bei Resize mit AutoXYWH

01 Feb 2018, 10:05

ok, Danke.
Das funktioniert super !

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 47 guests