Jump to content

Refreshing a label value


dinodod
 Share

Recommended Posts

Is there a way to refresh the value of a label on a gui?

i.e.:

gui with a label

label1 = "test"

*do some comamnds*

label1 = "new label"

refresh label1 on gui with new value

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
Share on other sites

Is there a way to refresh the value of a label on a gui?

i.e.:

gui with a label

label1 = "test"

*do some comamnds*

label1 = "new label"

refresh label1 on gui with new value

GUICtrlSetData

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

#include <GUIConstants.au3>
$Form1 = GUICreate("AForm1", 424, 162, 192, 125)
$Input1 = GUICtrlCreateInput("AInput1", 18, 28, 172, 21, -1, $WS_EX_CLIENTEDGE)
$Label1 = GUICtrlCreateLabel("ALabel1", 224, 25, 171, 24)
$Button1 = GUICtrlCreateButton("Set Label text", 24, 61, 109, 26)
$Button2 = GUICtrlCreateButton("Get Label text", 220, 63, 109, 26)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
        
    Case $msg = $Button1
        GUICtrlSetData($Label1,GUICtrlRead($Input1)); read input data and set label text
        
    Case $msg = $Button2
        GUICtrlSetData($Input1,GUICtrlRead($Label1)); read label data and set input text

    EndSelect
WEnd
Exit

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
Link to comment
Share on other sites

Thank you all for your help!

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...