Jump to content

Recommended Posts

Posted

in a gui or what ?

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Posted (edited)

GUI control:

Weight is the "boldness"

GUICtrlSetFont (controlID, size [, weight [, attribute [, fontname]]] )

Edit: Oh and 600 is "normal" bold.

Edited by jokke
UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
Posted

GUI control:

Weight is the "boldness"

GUICtrlSetFont (controlID, size [, weight [, attribute [, fontname]]] )

Edit: Oh and 600 is "normal" bold.

jep in a gui jokke i dont not fully understand what you mean sorry

Posted

$gui = guicreate("MY GUI", 500,500)
$label = guictrlcreatelabel("bold text", 500,500)

guictlrsetfont($label, 5, 800)

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Posted

Another snippet:

#include <GUIConstantsEx.au3>

GUICreate("font")

$size       = 9                 ;Font size.
$weight     = 600               ;Font weight
$attribute  = 0                 ;To define italic:2 underlined:4 strike:8 char format (add together the values of all the styles required, 2+4 = italic and underlined).
$font       = "Comic Sans MS"   ;Font name.

$handle = GUICtrlCreateLabel("bold text",10,10,100,20)
GUICtrlSetFont($handle,$size, $weight, $attribute, $font)
GUISetState()
    
While 1
    $msg = GUIGetMsg()
        
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
  • 5 months later...
Posted

sorry for bringing this topic up but i got a question about guictrlsetfont()

why does this not work and how should it works?

$hotsave = "Ctrl + S"
guictrlsetfont($hotsave, 5, 800)
$menu_options = GUICtrlCreateMenu("&Options")
$menuitem_save = GUICtrlCreateMenuItem("&Save as " & $hotsave, $menu_options)
You can't apply the font to a string variable; you have to apply it to a gui Control (regardless of the contents).

But, with a standard menu item I don't think you can apply different font attributes (they're controlled by global Windows settings).

Having said that, if you want a menu item bolded, give it the $GUI_DEFBUTTON attribute:

#include <GUIConstantsEx.au3>
GUICreate("test")
$hotsave = "Ctrl + S"
$menu_options = GUICtrlCreateMenu("&Options")
$menuitem_save = GUICtrlCreateMenuItem("&Save as " & $hotsave, $menu_options)
GUICtrlSetState(-1, $GUI_DEFBUTTON)
$menuitem2 = GUICtrlCreateMenuItem("Other Option", $menu_options)
GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = -3

Note: only one item in a menu can have the $GUI_DEFBUTTON attribute set.

If you set it more than once, the last item set will have the attribute.

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
  • Recently Browsing   0 members

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