User Tools

Site Tools


setflatmode_set_menu_flat_mode_.htm
Navigation:  Templates > Guide to all Templates > Additional Libraries and Templates > MenuStyleManager Class > MenuStyleManager Methods >====== SetFlatMode ( set menu flat mode) ====== Previous pageReturn to chapter overviewNext page

SetFlatMode( mode )

blk2blue.jpg

mode A BYTE value that sets the menu flat mode. A value of TRUE (1) turns flat mode on, and a value of FALSE (0) turns it off.

The SetFlatMode method controls the flat mode appearance of a target menu. When flat mode is off (FALSE), the selection bar appears “raised” in the menu structure. Otherwise the appearance of the selection bar is “flat”.

Implementation:

The method is usually called right after the Init method, and prior to setting menu colors.

Example:

 MenuStyleMgr.Init(?MenuBar)
MenuStyleMgr.SetFlatMode(False)
 MenuStyleMgr.SetColor(MenuBrushes:ImageBkgnd,12632256,12632256)
 MenuStyleMgr.SetColor(MenuBrushes:SelectedBkgnd,12632256,12632256,False)
 MenuStyleMgr.SetColor(MenuBrushes:SelectedBarBkgnd,12632256,12632256,True)
 MenuStyleMgr.SetColor(MenuBrushes:HotBkgnd,12632256,12632256,True)
 MenuStyleMgr.SetColor(MenuBrushes:FrameBrush,8421504, 8421504,True)
 AppFrame{PROP:Text} = 'Visual Styles Demo - Window2K Menu Style Active'
 DISPLAY()

See Also:     GetFlatMode( get menu flat mode )

setflatmode_set_menu_flat_mode_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1