Bwidget Source Code
View Ticket
Not logged in
Ticket UUID: cc3b12e22f47ea7b599af4ba5771bdcca9e6609b
Title: Error setting ListBox background in themed mode
Type: Bug Version: 1.9.7
Submitter: oehhar Created on: 2013-10-14 14:29:13
Subsystem: bwidget 1.x Assigned To: oehhar
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2013-10-14 15:33:26
Resolution: Accepted Closed By: oehhar
    Closed on: 2013-10-14 15:33:26
Description: (text/x-fossil-wiki)
<h1>ComboBox fails with "unknown option -bg" in themed mode</h1>
(sorry, title is wrong but not editable, this should be the title)

<h2>original text</h2>
Error when using themed mode:
Themed widgets do not have a background. When 'Widget::theme 1' has been used to turn an theming, The ListBox widget does not support some resources.
The new code takes care to avoid accessing resources of other widgets which are not supported when in themed mode.
The new (pricate) function _getfg tries to look up the foreground colour via the theme and only falls back to old-style widget resources.

Provided by Wolfgang S. Kechel

<h2>Test script</h2>
<verbatim>
Widget::theme 1
pack [ComboBox .l -values {A B C}]
pack [ComboBox .lc -values {A B C} -foreground yellow -background red]
</verbatim>

Both failed before.
The second still have the issue, that the listbox items are shown white on white for me.
User Comments: oehhar added on 2013-10-14 15:33:26: (text/x-fossil-wiki)
Committed in checkin [9c20e19e15]
Closed, thank you,
Harald

Attachments: