Ticket UUID: | 3382519 | |||
Title: | "Font" option configuration for selected page of NoteBook | |||
Type: | Patch | Version: | None | |
Submitter: | sosna | Created on: | 2011-07-29 22:38:14 | |
Subsystem: | bwidget 1.x | Assigned To: | oehhar | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2013-07-04 17:27:00 | |
Resolution: | Not Applicable Here | Closed By: | ||
Closed on: | ||||
Description: |
In documentation for BWidget it is stated that with "itemconfigure" command user can query/modify any option that can be used during NoteBook widget creation. With current version of BWidget (1.9.5) there is no possibility to change "-font" option for single page. I've made few modifications to file "notebook.tcl", and right now it is possible to do that. Modified file is attached to this report - maybe it is worth to include it in official release. Best regards to all, Michal. | |||
User Comments: |
oehhar added on 2011-09-05 14:04:02:
IMHO it is possible to make both work. Set and modify the default font of all tabs - by the -font option of the widget - by the option data base key (*NoteBook.font) Have an own font for a page as page option - If no page font is used, the default should be used (specially tricky, if the default font is changed later by widget configuration) - If a page font is used, use this one for this page. Prpably, an additional page property is needed, which is the empty string by default. In this case, use the default font, otherwise use this font. Please modify the patch to - keep compatibility - get your requirements work Thank you for your contribution! Harald sosna added on 2011-09-03 06:01:54: Hello Harald! Sorry for such late response - I was on vacation with limited access to the Internet. I was rather thinking about possibility to change font of each tab individaully - for example bolded font for currently selected tab. What you've wrote is true - with my modification property *NoteBook.font will not work - since it sets font for the whole widget - I didn't think about that. Anyway, thanks for looking into this issue. Best regards, Michal. oehhar added on 2011-08-22 17:10:10: I have tried the patch. Unfortunately, it breaks compatibility for me. - up to now, the font of the tabs was controled by the font attribute of the notebook or by the property *NoteBook.font Thus the font might be set by one of the following test scripts: <CODE> font create F16 -size 16 pack [NoteBook .n -font F16] -fill both -expand true .n insert end a -text a </CODE> or <CODE> font create F16 -size 16 option add *NoteBook.font F16 pack [NoteBook .n] -fill both -expand true .n insert end a -text a </CODE> unfortunately, this is does not working any more. Instead, one may use: <CODE> font create F16 -size 16 pack [NoteBook .n] -fill both -expand true .n insert end a -text a -font F16 </CODE> I would favor for the change, if the current methods would still work and if the additional option may change the font from this default for the current tab only. IMHO, code should be added to transfer the default font, if the font option is not given. Sorry, Harald oehhar added on 2011-08-15 00:55:52: Michal, thank you for the contribution. I was on holiday. Will look to your patch propably next week. Regards, Harald sosna added on 2011-07-30 05:38:15: File Added - 419739: notebook.tcl |
Attachments:
- notebook.tcl [download] added by sosna on 2011-07-30 05:38:14. [details]