How can i display a scrollable grid of images in matlab GUI?
I want something similar to what is shown below
This stackoverflow post describes a way of displaying images in a uitable by setting the 'String' property to an HTML code pointing to an image. But this requires me to save the images to disk which is not an option i would like as these displays are fired up dynamically.
It would also be nice, if i could add a checkbox inside each image so the user can select a subset of them.
You can use this tool. In the gui, you should be able to scroll through. But to have title below every image you might have to edit the tool.
Sample output:
a grid of images http://www.mathworks.in/matlabcentral/fx_files/22387/12/imdisp.jpg
The answer is here:
How can I use scrollbars in MATLAB figure windows when viewing large GUIs?
-> Note: This is a workaround, scrollbars are not available for Matlab-figures
I would suggest to use the tool Prashanth presented in his awnswer and combine it, by putting all elements within the panel.
Related
I have used bootstrap3 for RWD and customized my breadcrumb. But, it's not fitting in mobile size.
How can I make it responsive?
Attached screenshot of the problem.
Thanks
I have created a snippet on bootsnipp that may fit your needs.
http://bootsnipp.com/snippets/featured/responsive-breadcrumbs
You can configure this breadcrumb to
display only the last n elements. Ellipses are added at the beginning of the list if elements are hidden.
set a maximum size for each elements. Ellipses are added after the label if it's too long.
By setting breakpoints you can set the number of elements to display and their maximum size for different screen sizes and hence make sure there won't be any overflow.
You are going to have to code that yourself. Without your specific code, no one will be able to give you specific answers. That being said, here is how I would get set up to add custom code to my Bootstrap website.
Using less
First, create a new .less file - this file will be your new primary style sheet. In that file, import in the bootstrap.less file. Compile that file and link it in your HTML files. You should now have an exact copy of the out-of-the-box Bootstrap CSS, with access to all of the Bootstrap variables.
To make any additions, add them to that file underneath the import statement. So in your case, I would grab the variables for the media queries and breadcrumbs (found in variables.less), and customize the style of the breadcrumbs at smaller screens.
Note that Bootstrap is mobile first, which means that the default styles will be applied at the smaller screen, and you override for larger.
Not using less
If you are not comfortable using less, I would say this is a great opportunity to start. That being said, if you want to do it the old fashioned way, then just create a second style sheet that you link in, add it underneath the Bootstrap sheet, and code away.
I want to display my output messages that have processes in a function. The message is stored in a variable.
In the GUI window, I made an uipanel with tag=uipanel1.
So, my question is how do I display my messages in the specified uipanel that I made (uipanel1)?
Any ideas?
There are many ways to do this, but it is hard to guess the most appropriate way without some information on what you already tried. I would suggest the following options:
If your uipanel is not high and is used much like statusbar in gui applications then you better add a static text component to it and update its text through its handle.
While static test can also display multiline text it will not display scrollbars. If you want to display something like a message log window with several lines visible and scroll bars, I'd suggest to add a listbox instead. However, it will be a little tricky if you want to show only limited number of most resent messages.
My data set contains a column named IconUri that contains a full HTTP address to an image located on a web server. This data set is bound to a tablix, and I'd like to display the image in a cell.
1) I've tried to drag an image into the cell, but I can't use expressions as the image itself isn't aware of its parent's (the tablix) data set.
2) I've also tried to apply the image as a cell background, and while this certainly displays the image, it repeats it in horizontal and vertical direction, which is undesirable. The cell shall contain only one copy of the image.
3) I've tried to create a rectangle in the cell, but it will scale to the cell itself and thus the same effect as above.
Is there a way in which this might be done? I'm even open to performing some XML hacking if this is what is necessary. Thank you!
From the toolbox drag an image into your the cell of your tablix:
Then right click on the newly added image in the cell and select Image Properties:
Change the image source to External and then pick the dataset field that contains your product URL:
If you get the dreaded red cross instead of an image when you run the report, triple check that the URL actually does point at a publicly available image.
If your using a file from the file system rather than an image hosted at a url, you need to ensure the file path is in the form of "file:///C:/RDLCTest/TestImage.png".
If your also displaying the report in the ReportViewer control you will need to turn on EnableExternalImages for the report in code, but that isn't needed if your just outputting the report to say a PDF and downloading it
Use Image and in the image properties set the value to something like this
= Code.ConvertTotWebUrl(First(Fields!Logo.Value, "dsOrder"))
I solved this problem by examining the XML code that the editor created for the image, and I moved the relevant tag inside the tablix cell and assigned the appropriate bindings. When I re-opened the editor again, everything fell into place: the image recognizes the data source and compiling as well as rendering works flawelessly.
I have 3 GUI files created using GUIDE. I need to have a tab Panel where I can view all of them in different tabs.
There is no straightforward way to accomplish that. A figure cannot be displayed inside another figure. GUIDE creates figure. You can convert your GUIDE figure to programmatical GUI by using some conversion procedure. There is one official by Mathworks, or other ones on file exchange. Then, you should place the 3 figures children inside a panel each.
There is no tab object in MATLAB. You can generate your own by making your own graphical objects: the tab buttons, that users can click to run a function that puts the right "tab" in front using uistack to change the order of your graphical objects, always bringing the clicked tab to the front.
But you would do this all in one GUI, in one figure window; you just not to make sure that hold is on in the figure, and you have to give all your plots a handle so that you can manipulate them with uistack.
I am using GWT 1.6.4 and GWT-Ext 2.0.6. I am trying to use EditorGridPanel and facing rendering problems.
When the module loads I create a Panel (TopPanel) with BorderLayout and add that to the ViewPort. I then create another Panel (CenterPanel) and add EditorGridPanel, three buttons to the center of the BorderLayout Panel (TopPanel). I tried many layouts for CenterPanel but still not able to get what I want.
I want the table to showup with the required data and scrollbars. All the three buttons comes below the table. The data for the table come via Async call when the module loads, so when the screen is rendered to the user, the data is populated in the table. But looks like the table gets rendered with no data and when the async process finishes the table gets populated but don’t get resized to fit the screen so only show me one row.
The problem is with the Grid, I am not getting any scrollbars. Secondly I don’t want to define the height and width of the Grid. I want it to take as much as possible and show scrollbars, just like we do in html table by setting width and height as 100%.
Thanks
I have found the solution. I had to add the Grid on a panel. I had to set the layout of that panel to FitLayout(). Secondly had to call doLayout() on that panel after loading the Store with the data. I now get the scrollbars for the table as well as it fits the whole available space.