How to use a panel created inside a .fig file by other different .fig file? - matlab

I have two distinct files, myguide.fig (and its corresponding mygui.m) which contains the definition of an uitabgroup and the file caract.fig (and its corresponding caract.m) which contains a panel. I call the file caract.m from the file myguide.m and obtain the handle of the panel. Then I change the Parent property of the panel to assign it to one of the tabs of the uitabgroup. I only achieve that this works (setting the Visibility Property of caract.fig off) the first time I run myguide. If I try to run it a second time, I get the error message “Invalid handle object” for the handle of the panel returned. I do not understand what is happening.

Explained here:
http://undocumentedmatlab.com/blog/tab-panels-uitab-and-relatives/
Related articles:
http://undocumentedmatlab.com/blog/uitab-customizations/
http://undocumentedmatlab.com/blog/uitab-colors-icons-images/

Related

I cannot change FontSize when trying to modify text style in docx by using DocumentFormat dll

I looked at document.xml of my Template. There are "w:sz", "w:szCs", "w:lang", "w:b" inside for "w:p" and "w:r". I opened my doc.docx and only saved using DocumentFormat.dll. I see that appropriate text is in "w:t" element of a "w:r" of a "w:p" element and ect in the output. I see that the "w:r" has "w:rPr" and there are "w:b", "w:rFonts w:ascii w:cs, w:hAnsi" inside of it. "w:p" also has some properties. But "w:sz", "w:szCs" are not present. I tried to create RunStyleProperties and to prepend to an existing paragraph like in "how can I change the font open xml" except i did not create a run, used foreach for existing paragrapths and runs. I tried to recreate methods that are described in "https://learn.microsoft.com/en-us/office/open-xml/how-to-apply-a-style-to-a-paragraph-in-a-word-processing-document",but all my attempts were not effective. The fact is the style was not applied, the text style has some default values.

Eclipse 4 RCP: What is the difference between Handled ToolItem/Direct ToolItem/Toolcontrol?

When adding a new item to a toolbar, you are given the option to choose Handled ToolItem, Direct ToolItem and Toolcontrol:
What is the difference between these three choices? I can't find the documentation for these anywhere.
'Handled' items are used when you have defined a command id and one or more handlers for the command. In the HandledToolItem you specify the id of the command that is to be executed.
'Direct' items are used when you just want to specify a Java class to be executed without using a command id and separate handler.
Toolcontrol is used when you want to write you own code for the control in the tool bar (something like a Combo for example).

Tag prefix Win CC

I am busy with a C script in Siemens WinCC.
I would like to open a faceplate on in which I can open other faceplates.
Howerver, I would like to use the Tagprefix from the first faceplate in the second. Does anybody have an idea how I can give the tag prefix through?
Thanks in advance!
Tom
As You know, the tag prefix is a property of the screen window. You need to provide that data to the script running in the context of the picture inside the picture window from the parent screen window.
One solution is by using a text field "tagname" in the "faceplate" and use that as a source of the tag-prefix name. The tag-prefix can be transferred by a simple vbs script that runs "on open".
Use VBS "Item.parent.TagPrefix" and then give the result to the text field.
Or just from a button in the picture "Item.parent.parent.TagPrefix" is also ok.
The same in C would use the functions "GetParentPictureWindow", and return a string(lpsz) containing the name of the picture window. This name can be used to read the property of the object with this name using "GetPropChar" using "Tagprefix" as the property.
//PerD

Cascading input control is empty while accessing a Jasper Report

I call a jasper report through an independent URL through which I pass one of the input controls needed to run the report.
E.g. http:// localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&reportUnit=xyz&ParentFolderUri=abcd&j_username=xyz&j_password=xyz&parameter1=value1& . . .
As you can see in the above independent URL, I pass the JasperServer username and password, reportUnit name and location and other mandatory parameters, along with the report input parameter, i.e., "parameter1" which can have a value like "value1".
I used a mandatory, read-only and visible input control for this input value. Its value would come from the independent URL, showed in the box but was read-only and hence could not be changed.
The report was working absolutely fine upto this point.
But the tragedy began when my client rejected this idea. He wanted a completely invisible input control to my report and the input value would be passed through the independent URL, just like illustrated above.
And then my client asked me to refer to this and made me work on cascading input controls.
Recently I added a cascading input control to this report. The input control type is a single select query, which utilizes two parameters that I pass to the report through the independent URL.
Now when the Jasper server responds to the independent URL with the input parameters, all the other static parameters work properly, except for the cascaded one.
When I click the select box of the cascaded input, I can see the desired options for a second, and then, it just goes empty while I'm viewing the select list.
But when I make the "Parameter1" input control visible, the cascading input control works!
And then I turn in invisible, the cascading input control turns into a beast that does things by itself and not listen to his master.
I am not able to understand why this is happening. Could anybody please provide me a solution to this?
I have found a temporary solution for this.
I made the "Parameter1" input control visible and read only.
Next, I used a stylesheet and defined a style rule that would affect that input control's display on the web page, making "display: none".
I passed the name of the stylesheet through the URL. So this stylesheet is used for the report.
Now, the "Parameter1" input control is invisible to the end user and my report still runs with no one knowing it's just a fix.

Dynamically add fields to input dialog

Is it possible to somehow add input fields to an input dialog (inputdlg()) in MATLAB when a specific event occurs, e.g. the user types in a certain value in one of the existing fields...?
Or is there any other 'hacky' way to achieve this so that the user doesn't have to click "OK" and I have to code to reopen another input dialog which contains more input fields..
Thanks!
inputdlg is not a built in function, so you might as well copy it, call it by another name and change its functionality.