I'd like to attach a logo or change the whole background of an App Designer uifigure. How can this be done?
How to customize the background of an App Designer figure?
4.1k views Asked by asys At
2
There are 2 answers
0
Jan
On
Unfortunately I can't comment yet, so here is another answer.
Starting at Matlab 2017a the Controller does not have a Container property anymore. This works:
warning off Matlab:structOnObject
warning off Matlab:HandleGraphics:ObsoletedProperty:JavaFrame
win = struct(struct(struct(app).Controller).PlatformHost).CEF;
data_tag = char(struct(app).Controller.ProxyView.PeerNode.getId);
win.executeJS(['dojo.style(dojo.query("[data-tag^=''' data_tag ''']")[0],"background-image","url(https://upload.wikimedia.org/wikipedia/commons/8/80/Wikipedia-logo-v2.svg")']);
There is also the possibility to find all active webwindows using
webWindows = matlab.internal.webwindowmanager.instance.findAllWebwindows();
unfortunately I did not find out yet, which window belongs to which UIFigure (you could use the Title or Position to filter, but two identical UIFigures will cause problems).
Disclaimer, Davide Miani posted that information here: https://undocumentedmatlab.com/blog/customizing-uifigures-part-1#comment-406524
Related Questions in MATLAB
- Convert Cell Array of Symbolic Functions to Double Array of Symbolic Functions MATLAB
- How to restrict vpasolve() to only integer solutions (MATLAB)
- "Error in port widths or dimensions" while producting 27
- matlab has encountered an internal problem needs to close
- Minimize the sum of squared errors between the experimental and predicted data in order to estimate two optimum parameters by using matlab
- Solve equation with Crank Nicolson and Newton iterative method in Matlab
- Why options are not available in EEGLAB menu options?
- ash: ./MathWorksProductInstaller: not found, but file exists
- iterative GA optimization algorithm
- Create Symbolic Function from Double Vector MATLAB
- Fixing FEA Model loading with correct units and stress results
- loading variables from a python script in matlab
- Why cannot I set font of `xlabel` in `plotmf` in MATLAB?
- How would I go about filtering non-standardly formatted serial data which contains some junk binary between data entries?
- Cyclic Voltammetry Simmulation in MATLAB, I am running into issues with my data points returning as NaN values, i am a beginner, any help wanted
Related Questions in CUSTOMIZATION
- how to style mui 5 switch to look like a toggle switch
- Transposing labels on a continuous scale [waterfall graph, R]
- Innosetup: Optionally delete a file with checkbox
- Can Azure Functions encounter timeout exceptions?
- How to only modify one keyword color in Visual Studio Code?
- Customize menu in wordpress
- Remove grouping from numpunct of std::locale
- Customization to Last Week filter
- How do I let the user customize a specific portion of model in React Three Fiber?
- How to apply custom profiles/setting to Spinnaker to make it deploy with one command?
- Bash custom autocompletion triggered by key
- Difficulty Customizing Jira Templates: Seeking Solutions
- Customizing the Default Slack Message Input Window or APP window
- Customize user table used by Keycloak
- Is there Any way to show the toolbar columns menu by clicking on a customize Button outside the DataGrid in Material UI?
Related Questions in MATLAB-GUI
- Can I use parfor within a parfeval in Matlab R2019b and if yes how?
- matlab gui plot interaction with mouse to show graph x,y
- Why the load() function load nothing of .MAT file when used in GUI callbacks or other self-definition functions?
- Matlab: GUI radio button SelectionChangedFn Callback
- Connect Microsoft Access Database with MATLAB AppDesigner
- set input value from GUI into global variable in matlab
- Close uialert figure by button click
- Matlab GUI plot is blocking my click function
- How to reset MATLAB layout to default (commandline)
- Using a slider in MATLAB GUI
- How to assign colour to a value in static text box in GUI MATLAB
- Change the color of an inputdlg field name
- How to pass the numerical values inputted from a GUI to a .m file?
- To click the mouse several times
- How do you make a MATLAB's `uifigure` appear in the center of the screen?
Related Questions in UNDOCUMENTED-BEHAVIOR
- NtQueryDirectoryFile: Access Violation on Windows but not Wine
- Permission Policy Header, Origin trial feature not enabled: browsing-topics
- Purpose of CONSOLE_REAL_OUTPUT_HANDLE macro
- Executing arbitrary JS code in a MATLAB Online session
- TerminateProcess with GetCurrentProcess() handle and with GetCurrentProcessId() handle
- Importing named functions
- Why does pandas.apply(id, axis=1) return the same id for all rows?
- What is this `ConsoleHandle` HANDLE in my PEB?
- WSO2 API-manager returns 500 internal server error
- How does the (undocumented) return_value argument for unittest.mock.patch work?
- Windows NtCreateFile returning STATUS_INVALID_PARAMETER (using undocumented NT syscall interface)
- Undocumented '-c' option for Bash's 'declare'?
- What is the range of hue values in `Color.init(hue:saturation:brightness:opacity:)`?
- What is this bash built-in's printf's %a format specifier?
- How to link IUnknown_QueryServicePropertyBag
Related Questions in MATLAB-APP-DESIGNER
- Error with helper function in Matlab App Designer
- getting the error "Conversion to logical from string is not possible" while using UI table in MATLAB
- How do i add fields from append structure to HCMFAB_LEAVE_REQUEST_CR getway service
- Use an SDK with only an available .dll file in a MATLAB app project
- Is there a way to run code in Matlab App automatically _after_ the startup function runs?
- Variable transfer from App Designer to general .m script file
- Undefined function 'mtimes' for input arguments of type 'function_handle' in matlab app 2021
- Appdesigner_uitree_my_own_component
- How to plot multiple variables with independent Y axis (>2) on a UIAxis (App Designer)?
- Multiple instances of App Designer windows of MATLAB can not be reached with AppleScript in MacOS
- In MATLAB's App Designer, how can I have images extend beyond their cells in a Grid Layout?
- What software functionality requires triggering callback functions by adding or removing dynamic attributes?(matlab2020 code)
- Summon Exit parameters from a function in MATLAB App Designer
- Matlab App Designer Table cells to be edited on single click
- Materials Icons not displaying in Matlab App
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
If you want to set a solid background color for the entire figure, there exists a documented way to do this, e.g.:
uipanelwith no title or border (uipanel(...,'BorderType','none','Title','','BackgroundColor',[R G B])).If you want to set an image as background of the entire figure:
Result:
If you want to set an image as background of just some region:
Result:
Notes:
The last two examples are based on these two posts: 1, 2, and the principle of operation is adding a
background-image: "..."entry to thestyleproperty of some desired UI element (which happens to be an HTMLdiv).A tool for programmatic manipulation of App Designer figures can be found in this GitHub repository.
The example image happens to be an
.svg, which is interesting, because we can export "regular" MATLAB figures in this format, and later use them as backgrounds for auifigure:)