Sign in to follow this  
Followers 0
myspacee

update GUICtrlSetTip

5 posts in this topic

Hello to all,

i'm realizing a 'wizard' for a boring task in my office.

An input box wait for a value to enable buttons and suggest user what to do.

Is possible to update GUICtrlSetTip value after build my GUI ?

thank you for help,

m

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Is possible to update GUICtrlSetTip

Sure, just issue the command again ...

whim

Edited by whim

Share this post


Link to post
Share on other sites

ok, but when i'm in my main cicle, how point tip to a specific button ?

post some code to correct :

#include <GUIConstantsEx.au3>
#Include <Date.au3>

Example()

Func Example()
    Local $msg
    $time = _DateDiff( 's',"1970/01/01 00:00:00",_NowCalc())

    
    GUICreate("My GUI control tip") ; will create a dialog box that when displayed is centered
    $Button_01 = GUICtrlCreateButton("1 - Share directory", 21, 103, 150, 25)
    GUICtrlSetTip(-1, $time)
    
    $Button_02 = GUICtrlCreateButton("2 - update my tip", 21, 150, 150, 25)
    GUICtrlSetTip(-1, "update tip on button 1")
    GUISetState()

; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
            
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                Exit
            Case $msg = $Button_01
                MsgBox(0, "", "i'm button 1", 2)
            Case $msg = $Button_01
                MsgBox(0, "", "update tip on button 1", 2)
                GUICtrlSetTip($Button_01, "ok - i'm updated")
        EndSelect
        
            
    WEnd
EndFunc  ;==>Example

- button 1 has a tip (time)

- when press button 2 code must update tip on button 1

But i wrong something...

can you help me ?

m.

Share this post


Link to post
Share on other sites

myspacee,

See something wrong here?

Case $msg = $Button_01 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

MsgBox(0, "", "i'm button 1", 2)

Case $msg = $Button_01 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

MsgBox(0, "", "update tip on button 1", 2)

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

i'm write example too quickly,

correction made things works,

thank you,

m.

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