Small font in menus

Just starting out? Need help? Post your questions and find answers here.
AZJIO
Posts: 69
Joined: Wed Dec 14, 2022 1:13 pm

Small font in menus

Post by AZJIO »

I have a large font on my phone. When I open the menu (CreatePopupMenu), everything is so small that it's hard for me to put my finger on the item. My finger is as wide as two menu items. Is it possible to increase the height and font of a menu item?
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Small font in menus

Post by Peter »

Each menu item has the class 'dijitMenuItem'. With CSS you can change the font size.

Code: Select all

! $("head").append("<style>.dijitMenuItem{font-size: 24px}</style>");

Procedure MenuEvents()
  Debug "Menu item selected: " + EventMenu()
EndProcedure

If OpenWindow(0, 200, 200, 200, 100, "Menu Example")
  If CreateMenu(0, WindowID(0))    ; menu creation starts....
    MenuTitle("Project")
    MenuItem(1, "Open"    + #TAB$ + "Shift+O")
    MenuItem(2, "Save"    + #TAB$ + "Shift+S")
    MenuItem(3, "Save as" + #TAB$ + "Shift+A")
    MenuItem(4, "Close"   + #TAB$ + "Shift+C")
  EndIf
  
  BindEvent(#PB_Event_Menu, @MenuEvents())
EndIf
AZJIO
Posts: 69
Joined: Wed Dec 14, 2022 1:13 pm

Re: Small font in menus

Post by AZJIO »

Thanks, I inserted the font size 18 into the existing class.
SpiderBasic\Libraries\javascript\dojo\themes\flat\flat.css

Code: Select all

.dijitMenuItem {
	font-size: 18px;
}
Post Reply