about gui menu items - matlab-guide

In my gui, I have created a menu with things like file, view, edit,
compile results, help and etc....using the menu editor in gui layout
editor. I intend to "refresh the gui contents just below the menu"
For eg when a user click view in my gui he would be able to view a
view simulated results page, instead of the "front page" when people
first open my gui.
Can you teach/guide me how to do it? Under the content of menu-view
callback function, I type an openfig('new figure.fig'), so when ppl
press the view menu, it will open up another figure of new contents
and graphics. But It would open another figure, in the end i have two
figures. I like to make the new contents just refreshed below the
menu, and not with a "new page". Is matlab gui able to do that?

You can just use one figure, give it a handle name and turn hold on:
fig = figure;
hold on;
Then have two sets of axes or if you don't need axes, just two graphical objects defined by a matrix, i.e. (axes)
screen_1 = axes;
screen_2 = axes;
OR (graphical objects)
screen_1 = plot(NaN,NaN);
screen_2 = plot(NaN,NaN);
then you can change their order in the stack:
uistack(screen_1,'bottom');
or set them (and any of their children) invisible:
set(screen_1,'Visible','off')
also, be wary: (From MATLAB)
Note In a GUI, axes objects are always at a lower level than uicontrol objects. You cannot stack an axes object on top of a uicontrol object.

Related

Oracle Reports-How To Add Field Object To Repeating Frame

I want to add field object to an existing repeating frame.But when I drag the field, new frame is generated.
See Image below.
I want to do is put the field F_PO_NUMBER under R_INVOICE frame.
Doble-click on the Paper Layout node.
Touch R_INVOICE repeating frame on the Object Navigator.
Change Fill colour of R_INVOICE by selecting a different than that already has ( colour palette pointers are located on the left side of the Paper Layout ).
Let's choose gray as fill colour, and then there will appear a great gray box on the Paper Layout.
Just drag F_PO_NUMBER to the inside of that gray box. If some frames or objects slides as you drag F_PO_NUMBER, apply immediately an undo by pressing Ctrl+Z, and play with Flex On/Off or Confine On/Off buttons up to your object is able to be removed into that gray box.
I'd suggest you to
create a backup copy of that RDF file - you might need to restore the report if something goes wrong
go to paper layout editor
turn flex OFF (so that frames wouldn't stretch)
select any field in the R_INVOICE frame (for example, F_INVOICE_NUMBER)
copy/paste it (Ctrl+C / Ctrl+V)
a new item (named F_INVOICE_NUMBER1) will be created slightly right & below from the original item)
move it to a new position
if necessary, switch flex ON (and, possibly, confine ON/OFF), but be very careful because you might spoil current layout, and - if you do that - it might be difficult to revert changes. Undo works only 1 level back
change its name & source so that they are appropriate (i.e. F_PO_NUMBER)
save & run the report. Hopefully, it'll be OK.
P.S. As you already have the R_1 frame (which is useless), I'd suggest you to remove (in paper layout editor) it, as well as current F_PO_NUMBER field (visible on your screenshot).

Libgdx - Making a drop-down menu/settings screen

I'm looking to make a drop-down menu and drop-down settings screen but I couldn't find any resources for making these in Libgdx. Would like some pointers to good resources for this specific type of interface or a quick example.
Thanks!
SelectBox is in LibGDX can be used for drop-down list, it allows one of a number of values to be chosen from a list. And for pop-up window you can use Dialog.
stage=new Stage();
Skin skin=new Skin(Gdx.files.internal("skin/glassy-ui.json"));
dialog=new Dialog("Setting",skin);
dialog.setSize(200,200);
dialog.setPosition(Gdx.graphics.getWidth()/2-100,Gdx.graphics.getHeight()/2-100);
final SelectBox<String> selectBox=new SelectBox<String>(skin);
selectBox.setItems("XYZ","ABC","PQR","LMN");
dialog.getContentTable().defaults().pad(10);
dialog.getContentTable().add(selectBox);
stage.addActor(dialog);
Gdx.input.setInputProcessor(stage);
Output

Put a Picturebox over a flow layout panel without it being affected by the flow. I can just put it everywher I want including over the panel

Is it possible to put a picturebox over a flowlayoutpanel without it being affected by the flow?
Yes. You simply have to make sure that it's parent is the form rather then the FLP. If you drag the PictureBox in the designer then you'll probably end up dropping in on the FLP. Instead, add it to the form and then set the Location property manually to move it. You can then manipulate the z-order in the Document Outline window if necessary to make sure the PictureBox is in front, or you can just right-click one of the controls and select "Send to Back" or "Bring to Front".

VB6 + how to switch between windows/frame in form by buttons

I am very new beginner with VB6 and I hope I explain the things right
I want to create form with 2 buttons (the buttons are located on the top form position )
So each button will switch to other form/window/frame
For example
The first button will show window 1 (there I can set only parameters)
The second button will show window 2 (there I can set only IP address)
Please advice if we can do that by VB6 ?
And if yes how to do that ( step by step )
Remark - Similar example but with multiple windows in the same form is the system properties ( right click on my computer and properties ) , the we can see each button will view different window
Create a form with 2 buttons, Command1 and Command2.
On this form, create 2 frames, Frame1 and Frame2. hide Frame2 and make sure to line up both framesso that they are of the same size and located right on top of each other (Top, Left, Width and Height properties must be the same)
Now put this code in:
Private Sub Command1_Click()
Frame1.Visible = True
Frame2.Visible = False
End Sub
Private Sub Command2_Click()
Frame1.Visible = False
Frame2.Visible = True
End Sub
Now each the first button shows the first frame while hiding the 2nd. The second button hides the first frame and shows the seconds. I think this is the simplest way to implement your task.
PS: don't forget to name your objects properly, it's not a good idea to have default names like Command1 or Frame2 - should be more descriptive than that.
It sounds like you are asking about the tabbed dialog control. To use a tabbed dialog control in VB6:
Click Project -> Components
Scroll down to "Microsoft Tabbed Dialog Control 6.0" and select it.
Click the Apply button.
You should notice a new control in the component tool box. If you do not see the toolbox, click View -> ToolBox. This is the same area of the IDE where you first click to add a button to a form. The tabbed dialog control looks like the top tab of several file folders. When you hover your mouse over the control in the toolbox, you will see a tool tip text of "SSTab". Click this control and then draw a rectangle on your form.
By default, this will add a tabbed dialog control with 3 tabs, but you can change this in the properties window. You can now create any control on top of a tab of the tabbed dialog control and interact with the control exactly the same way you would if the control was placed on the form itself.
What you want is called an MDI Form. It's a form that contains other forms.
You can find a full tutorial on them here, but here's the gist of what you want to do:
Set the "MDIChild" property of all your subforms you want to use to True. Disable their minimize, maximize, and resize functions as well.
Create an MDIForm. Disable its AutoShowChildren property.
Add a toolbar to the MDIForm. Add buttons to the toolbar corresponding to the forms you'll be switching between.
Implement each button's click event, to create child form as expected (or switch to an existing one).

How to place a windowless control on top of a windows control?

Say, I have an Image control (which seems to be a window-less control) and I want to make sure that it is on top of a TextBox. No matter what I do, the Image control will not appear on top of the Text box.
Is there a way?
P.S. I know I can use a PictureBox, but it does not support transparency, thus I must have the Image control.
There is no way to place an image control over a normal textbox as they are drawn onto the form itself so will always be below any other windowed components.
If you have VB6 installation media there are drawn (windowless) versions of controls including a TextBox you can use that will (probably) do what you want; http://support.microsoft.com/kb/184687
A custom usercontrol of some kind if probably better .. what is it exactly you want to overlay the textbox with?
The Image Control is considered a graphical control, like shapes, so it is always inferior to text controls. If you really want a transparent image, you can use a Microsoft 2.0 Form instead(only if you have it). Images there can be on top of textboxes, and you can make it transparent by setting the Backstyle to Transparent(0).
Completely different approach to my other answer (hence the seperate Answer), but you can set AutRedraw and ClipControls on your Form to false and it will allow the Image control to render on the same layer as a windowed control. You can get some flakey redrawing in some cases but for a quick solution you could try it.
http://msdn.microsoft.com/en-us/library/aa733621(v=vs.60)
I've created a tranparent overlay control to add a kind of annotation layer on top of a VB6 app. I'll attempt to describe it from memory, and if that doesn't provide enough information then you can post back and I'll try to dig up the code.
First, add a new USerControl to you application. Give it a name like ImageEx, PictureEx, or TransparntImage. There are several properties that you will need to use. Ensure the control is Windowed, so it can sit on top of other windowed controls. Locate the MaskColor property and set it to Cyan (or whatever color you elect to use to indicate a tranparent area. There might be an addition property enable the masking behavior, just browse the properties. Set the control background color to that of the MaskColor. At this point you have an invisible control. In my control I painted on top of the surface for annotations, but you can PaintPicture or maybe even set the image property for a really simple approach.
Of course, to make this a re-usable control, you will want to code in your own properties that allow the MaskColor and image, etc to be set so that you can the drop one of these on any form you want.
Some links:
MaskColor Property
MackPicture Property
1) Remove all your textboxes , labels and ... (But memorize their name and location in the form)
2) Go to (project > components) and mark the (Microsoft Forms 2.0 Object Library) then click ok
3) Now you can see new controls under your default controls in your toolbox...
4) Use its textbox and label controls instead of the default controls
5) Right click on your Image Control then click (Bring To Front)

Resources