Bwidget Source Code
Check-in [0c75c51ff3]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:mainframe.tcl: Add optional parameter "Top" to internal function "MainFrame::_create_menubar" to allow to use a menu button for the main menu (Hack).
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA3-256: 0c75c51ff3aa50a9a7f95b8191407bab80315a12c4bd1d1579be15ef518351a0
User & Date: oehhar 2019-05-06 16:59:24
Context
2019-05-07
11:34
mainframe.tcl: Allow to skip a main menu level by empty menu label. Purpose: support commands/checkboxes at first level. Leaf check-in: 96249ade71 user: oehhar tags: bwidget
2019-05-06
16:59
mainframe.tcl: Add optional parameter "Top" to internal function "MainFrame::_create_menubar" to allow to use a menu button for the main menu (Hack). check-in: 0c75c51ff3 user: oehhar tags: bwidget
2018-12-11
09:38
Remove executable file flag from script and text files check-in: aaa5ff20ff user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.










1
2
3
4
5
6
7








2018-12-11 Harald Oehlmann <[email protected]>
	scrollframe.tcl: use Tk8.7 TIP 518 virtual event
	<<NoManagedChild>> to resize client frame to 1x1 when
	last child is unmapped.

2018-12-06 Harald Oehlmann <[email protected]>

>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2019-05-06 Harald Oehlmann <[email protected]>
	mainframe.tcl: Add optional parameter "Top" to internal
	function "MainFrame::_create_menubar" to allow to use
	a menu button for the main menu (Hack).
	The mainframe may be initialized with "- menu {}".
	Then, the menubutton may be created and the menu may
	by added by:
	MainFrame::_create_menubar .mf $mitems $menubutton

2018-12-11 Harald Oehlmann <[email protected]>
	scrollframe.tcl: use Tk8.7 TIP 518 virtual event
	<<NoManagedChild>> to resize client frame to 1x1 when
	last child is unmapped.

2018-12-06 Harald Oehlmann <[email protected]>

Changes to mainframe.tcl.

524
525
526
527
528
529
530



531
532
533
534

535

536
537
538
539
540
541
542
    }
}


# ----------------------------------------------------------------------------
#  Command MainFrame::_create_menubar
# ----------------------------------------------------------------------------



proc MainFrame::_create_menubar { path descmenu } {
    variable _widget
    global    tcl_platform


    set top $_widget($path,top)


    foreach {v x} {mbfnt -menubarfont mefnt -menuentryfont} {
	if {[string length [Widget::getoption $path $x]]} {
	    set $v [list -font [Widget::getoption $path $x]]
	} else {
	    set $v ""
	}






>
>
>
|



>
|
>







524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
    }
}


# ----------------------------------------------------------------------------
#  Command MainFrame::_create_menubar
# ----------------------------------------------------------------------------
# For Android, a menubutton is more appropriate.
# To support this, the menubutton widget may be passed as 3rd
# parameter.
proc MainFrame::_create_menubar { path descmenu {top ""} } {
    variable _widget
    global    tcl_platform

    if {![string length $top]} {
        set top $_widget($path,top)
    }

    foreach {v x} {mbfnt -menubarfont mefnt -menuentryfont} {
	if {[string length [Widget::getoption $path $x]]} {
	    set $v [list -font [Widget::getoption $path $x]]
	} else {
	    set $v ""
	}