Sign in to follow this  
Followers 0
PartyPooper

TrayMenu Item Text

7 posts in this topic

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?

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

Won't work because all it will display is '<b>text goes here</b>'.

Currently, I'm using something like TrayCreateItem("text goes here")

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

@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

[center]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.[/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites

LOL right in front of me. I must have read that about a dozen times but somewhere in my brain there was a disconnect between default item and bold text. Thanks Smoke.

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