DCMENUBAR
Posted: Wed Feb 11, 2015 2:34 am
Hello,
have two questions:
1. it seems that the height of the menu bars are limited, is there a way to make them higher? I try to optimize my software for tablet and touch user
2. it seems that I cannot define different colors for the vertical bar background than the menu item foreground, they are the same as far I see
regards
Rudolf
have two questions:
1. it seems that the height of the menu bars are limited, is there a way to make them higher? I try to optimize my software for tablet and touch user
2. it seems that I cannot define different colors for the vertical bar background than the menu item foreground, they are the same as far I see
regards
Rudolf
Code: Select all
proc main()
******************************************************************
local getlist := {},oMenuBar,oMenu1,cFont := "40.Arial"
local aConfig := array(12)
aConfig[1] := GRA_CLR_PALEGRAY // A/N Default Background color of pulldown sub menus
aConfig[2] := GRA_CLR_BLACK // A/N Default Foreground color of Vertical Bartext area of sub menus.
aConfig[3] := GRA_CLR_DARKGRAY // A/N Default Background color of Vertical Bartext area GraMakeRGBColor({160,200,230})
aConfig[4] := GRA_CLR_WHITE // A/N Default Color of menu outline.
aConfig[5] := "40.Arial bold" // C Default compound font name of the Vertical Bartext are of sub menus.
aConfig[6] := .t. // L/NIL A logical .TRUE. to enable the OwnerDraw feature A logical .FALSE. to disable the OwnerDraw feature
aConfig[7] := cFont // C Default compound font name of the check character to use when a sub menu item is checked.
aConfig[8] := chr(77) // C Default single character to use for the check when a sub menu item is checked.
aConfig[9] := GRA_CLR_WHITE // A/N Default MenuBar Foreground Color.
aConfig[10]:= GRA_CLR_DARKBLUE // A/N Default MenuBar Background Color.
aConfig[11]:= GRA_CLR_BLUE // A/N Default Foreground color of pulldown sub menus
aConfig[12]:= cFont // C Default compound font name of the Menubar.
DC_XbpMenuConfig(aConfig)
DCMENUBAR oMenuBar OWNERDRAW
DCSUBMENU oMenu1 PROMPT "Test menu 1" PARENT oMenuBar BARTEXT "Test Menu 1"
DCMENUITEM "Test 1" ACTION {||tone(400,1)} parent oMenu1
DCMENUITEM "Test 2" ACTION {||tone(400,1)} parent oMenu1
DCMENUITEM "Test 2" ACTION {||tone(400,1)} parent oMenu1
@ 5,5 dcpushbutton caption "check" size 30,2 action {||DC_inspectobject(oMenuBar) }
@ 8,5 dcpushbutton caption "ok" size 30,2 action {||DC_ReadGuiEvent(DCGUI_EXIT_OK,GetList) }
dcread gu