Closed davidn-IA closed 6 years ago
Thanks for the catch, we haven't looked too much at UI elements that aren't direct children of the UIFigure
object.
I would prefer to use ancestor
if you'd like to update & repoint the PR with something like the following instead:
function [win] = getWebWindow(hUIObj)
hUIFig = ancestor(hUIObj, 'figure');
If not, I can add & push sometime this afternoon.
Hi @davidn-IA, nice to see you here :-)
I think it would be better to leave the existing code as-is (i.e., a simple call to mlapptools.getWebWindow
) and simply modify getWebWindow()
to look not at the input arg directly but rather its figure ancestor (along the lines of what @sco1 just commented above)
Thanks @altmany, that makes more sense. I forgot that there are multiple calls to getWebWindow
so it's smarter to fix there :)
I've updated my comment above.
Did not realize ancestor worked with uifigure, thanks @sco1. @altmany , it's about time I give something back. :-)
So maybe close this and re-post as an issue to fix getWebWindow? (also please see the other issue I posted, thanks!)
@davidn-IA Feel free to add another commit to this PR to save time. When merging we'll just squash :)
Fix has been implemented & pushed with 88b82f6 (fat-fingered the commit message reference)
This can be closed, thanks again for spotting the issue!
This allows, for example, a text area inside a panel, to have the text formatted with bold face font. Previously this caused an error.
f = uifigure('Position', [680 558 560 420]); p = uipanel(f,'Position',[20 20 520 380]); txa = uitextarea(p, ... 'Value', 'Lorem ipsum', ... 'Position',[20 20 480 340]); mlapptools.fontWeight(txa, 'bold');