Re[2]: Icons with text underneath

new topic     » topic index » view thread      » older message » newer message

Thanks, it works.

But why is something like this:

constant PushButton3 = createEx( PushButton, "PushButton3",
FlatToolBar2, 0, 1, 38, 38, 0, 0 )

shows text below the button, while this

constant PushButton3 = createEx( PushButton, "PushButton3",
FlatToolBar2, 0, 0, 38, 38, 0, 0 )

dont show the text.

The difference is the "y" parameter.

Is it documented somewhere?

Thanks!

______________________________________________


D> On Mon, 26 May 2003 11:47:38 +0700, aku saya <akusaya at gmx.net> wrote:

>>
>> Sorry if this is a duplicate message, but I didn't see my post on the
>> list.-------
>>
>> How to make a toolbar, that has icons with text underneath it?
>>
>> It is like the thing in the attached picture.
>>
>> Thanks!
>>
>> btw, thanks for the many icon suggestions!

D> Use a FlattoolBar control. Here is some win32lib code...

D> ---------------------
D> without warning
D> include win32lib.ew

D> integer Win, TB
D> integer B1, B2
D> integer tbheight

D> -- Get some icons to use.
D> constant closefolder = extractIcon( "clsdfold.ico" ),
D>     openfolder  = extractIcon( "openfold.ico" ),
D>     dos         = extractIcon( "disk05.ico" ),
D>     linux       = extractIcon( "disk06.ico" ),
D>     generic     = extractIcon( "disks04.ico" ),
D>     icons = {addIcon( {closefolder, openfolder, openfolder} ),
D>              addIcon( {dos, linux, generic } )
D>             }

D> -- Create the main window
D> Win   = create( Window, "Simple Flat ToolBar Demo",  0, 0, 0, 300, 300, 0 )

D> -- Calc to toolbar height as Large Icon size + twice the current font 
D> height.
D> tbheight = (getSystemMetrics(SM_CYICON) + 2 * getTextHeight(Win, "|"))

D> -- Add the flat toolbar.
D> TB    = create( FlatToolBar, "", Win, 0, 0, 0, tbheight, 0)

D> -- Add a couple of buttons with tooltips.
D> B1    = create( PushButton, {"Folders", "Folder Functions"},  TB, icons[1], 
D>  10,  0,  0, 0)
D> B2    = create( PushButton, {"OpSys", "Operating System Functions"},
D>                             TB, icons[2],  10,  0,  0, 0)
D> -- And that's it.
D> WinMain( Win, Normal )
D>         ----------------

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu