Jump to content

TrayMenu Item Text


Recommended Posts

I had a look in the help file but I can't see anything that allows me to 'bold' the text of a traymenu item - something like GUICtrlSetFont(-1, 800) does to a normal control. I would like to bold the text of default item so it identifies which item is activated when I doubleclick on the icon. Any suggestions?

Link to comment
Share on other sites

Ok, Im not sure, and unable to check atm, but have you tried html?

<b>text goes here</b>

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

Not familiar with it but you could try putting it in brackets.

{<b>text goes here</b>}

or maby

{<b>}text goes here{</b>}

Sorry if this dosnt help all I can think of, I usually just 'try' and fool around with stuff trying to get it to work.

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

Link to comment
Share on other sites

  • Moderators

@PartyPooper, try this (TrayItemSetState()):

#Include <Constants.au3>
#NoTrayIcon

Opt("TrayMenuMode",1)   ; Default tray menu items (Script Paused/Exit) will not be shown.

$settingsitem   = TrayCreateMenu("Settings")
$displayitem    = TrayCreateItem("Display", $settingsitem)
TrayItemSetState($displayitem, 512)
$printeritem    = TrayCreateItem("Printer", $settingsitem)
TrayCreateItem("")
$aboutitem      = TrayCreateItem("About")
TrayCreateItem("")
$exititem       = TrayCreateItem("Exit")

TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $aboutitem
            Msgbox(64,"about:","AutoIt3-Tray-sample")
        Case $msg = $exititem
            ExitLoop
    EndSelect
WEnd

Exit

Not familiar with it but you could try putting it in brackets.

{<b>text goes here</b>}

or maby

{<b>}text goes here{</b>}

Sorry if this dosnt help all I can think of, I usually just 'try' and fool around with stuff trying to get it to work.

btw, if you know the soultion to my problem, http://www.autoitscript.com/forum/index.php?showtopic=27235, could you please try and help me?

Way to hijack a thread... I gave you the solution in the first post after yours.... Use Larry's UDF's or use IE (or show your attempts to use the .dll). Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Yes, sorry about that, I edited it out, I was getting impatient...>.<

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

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...