Sign in to follow this  
Followers 0
Bert

GUICtrlCreateLabel - question

4 posts in this topic

I made a GUI to display a message. I needed the GUI to have a certain background color. Works fine. I wanted to do something with it and I'm not quite sure how. Here is the code for the GUI:

$help_R = GUICreate("Help in Problem Ticket view", 445, 130)
      GUISetBkColor (0xE0FFFF)
      GUICtrlCreateLabel ("F1= Opens a help file showing the functions." & @CRLF _
             & "F5= Refresh: This will refresh the current view." & @CRLF _
             & "F6= Quick Paste: This will paste pre-determined text of your choice to fields." & @CRLF _
             & "CTRL + ALT + X: Closes UNPlus, but leaves Unicenter ServiceDesk open" & @CRLF _     
             & "Print Scrn= Print Ticket: This will print your ticket to your default printer.",  5, 5, 440, 95)
      $button1 = GUICtrlCreateButton("OK", 185, 102, 60, 20)
     ; Run the GUI until it is closed
      GUISetState()

What I like to do is where it says "F6", I would like to make that a variable so depending on how I have a setting in my INI file, the correct information would be displayed. If I have F7 in the INI, the message box would show F7. I remember seeing this done a while back, but I don't remember where.

Is it like this?: "& $variable &"

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

like this

#Include <GUIConstants.au3>
 
; $var = iniread(.....
 $var = "F6"
 
 
 $help_R = GUICreate("Help in Problem Ticket view", 445, 130)
      GUISetBkColor (0xE0FFFF)
      GUICtrlCreateLabel ("F1= Opens a help file showing the functions." & @CRLF _
             & "F5= Refresh: This will refresh the current view." & @CRLF _
             & $var & "= Quick Paste: This will paste pre-determined text of your choice to fields." & @CRLF _
             & "CTRL + ALT + X: Closes UNPlus, but leaves Unicenter ServiceDesk open" & @CRLF _     
             & "Print Scrn= Print Ticket: This will print your ticket to your default printer.",  5, 5, 440, 95)
      $button1 = GUICtrlCreateButton("OK", 185, 102, 60, 20)
    
      GUISetState()
      
      
     ; Run the GUI until it is closed
       
       While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    
    EndSelect
WEnd

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

welcome

8)


NEWHeader1.png

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