In the description of Matlab help:
Flexible port placement in Simulink Editor lets you move ports by clicking and dragging the port along the block icon outline, and this way you can put ports on any side of a Subsystem block, including top and bottom. The Port location on the parent subsystem parameter does not have separate values for top or bottom. If you drag a port to a different location on the Subsystem block icon, the parameter value automatically changes to reflect the new placement:
Left — The port appears on the left or top side of the subsystem icon.
Right — The port appears on the right or bottom side of the subsystem icon.
How to use code to realize the function of changing port location?
For example, add a port dynamically and place it on the top of the icon.
Related
I don't understand the change of the panel not being where it's supposed to be.
Suddenly, pressing command+J opens the panel at the bottom of the screen, instead of to the right. I have not changed anything in my settings, although this error message seems to have turned up in my settings since the last update;
Workbench › Panel: Default Location
With the introduction of the side panel, the panel position is no
longer able to be moved in favor of moving view containers between
the panels.
Googling this does not give me any results. What does it mean?! What side panel, if not THE side panel (which is now a bottom panel) are they talking about?
See https://github.com/microsoft/vscode/issues/141349#issuecomment-1033046397 for an update on the changes made in v1.64 on this issue and inclusion in the recovery build soon.
The recovery build is out:
In v1.64.2 which hasbeen released. Put the Side Bar on the right and use the command View: Move Panel Right (or Left or Bottom). In one workspace with the setting Workbench > Panel: Default Location : right it put the Panel to the right of the Side Bar (so far right) but triggering the command fixed that. Editor | Terminal (Panel) | Side Bar. And working if put on the left too.
With the Recovey Build mentioned above, the following answer is largely "deprecated". I'll leave it for historical purposes.
This behaviour, of moving the Panel to the bottom despite your panelLocation setting is the result of the new Side Panel coming to Stable v1.64. The olde workbench.panel.defaultLocation setting has been deprecated and the Panel will remain at the bottom despite the defaultLocation setting. [Apparently, "deprecated" in this case means ignored.]
But, now you can have the traditional Side Bar on one side, the new Side Panel on the opposite side and the Panel on the bottom. Or turn off any of those.
Replacing Panel Location
As mentioned above, the new Side Panel provides similar functionality
as moving the Panel to the left or right, yet improves on this by not
forcing the move of the original panel. Along with view drag and drop
between panels, the new Side Panel is replacing the option to move the
bottom Panel.
In light of that, we have deprecated the
workbench.panel.defaultLocation setting as well as the Move Panel...
commands in favor of similar commands Move Views From Panel To Side
Panel (workbench.action.movePanelToSidePanel) and Move Views From
Side Panel To Panel (workbench.action.moveSidePanelToPanel). The old
commands will remap to the appropriate new command providing the
similiar behavior. Though, we recommend updating your keybindings to
the new commands.
See more here: Release Notes: New Side Panel
I have a Perl/Tk window which is displayed on top of all other windows. It is a MainWindow->Frame->Label with text (it's a security classification banner). It must be a window which is on top. However, right now a user cannot move the window from its set location, so it will occasionally cover up a lower window control.
How can I make this window movable so it can be repositioned?
I don't have easy access to external modules since I'm on a closed network, so simple Perl/Tk code is best.
This is a Linux system running the KDE or Gnome desktop.
I have found that if you remove the decorations from a Perl/TK mainwindow, it cannot then respond to mouse movements.
I have a nice wide screen, and in VS Code I would like some more room for both my file explorer and my code outline. So it would be nice if I could have two panels with in one the explorer and in the other the outline. Is this possible?
See https://stackoverflow.com/a/69329503/836330 This is in Stable v1.64.
Then View/Appearance/Show Side Panel or use the icon in the upper right as shown in the demo. That will open up a second side panel (on the opposite side of your Side Bar, the Side Bar is the panel which typically holds the Explorer view for example).
You can drag various views like the Outline view into this second "Side Panel".
It's possible to designate a key as associated with a NetLogo button. But the key-press will not activate the button unless the keyboard is in the appropriate state. (I'm not sure what to call that state.) For example, when one starts a model, keys do not activate buttons until one clicks the background outside both the view and the command center. (Try Games > Frogger, Minesweeper, etc. in the Models library.) Also, if one types into the command center, one must click outside to re-active the key-button connections.
Is there a way to activate the keyboard-button connections with code -- so that it can be done, e.g., in setup?
No, this isn't under programmatic control, and it's by design that the command center normally has keyboard focus.
As a user, the easiest thing to do is hide the command center (there's even a keyboard shortcut for this) if you aren't using it, then the keyboard focus will be on the widgets.
I'm working on an intellisense or code-completion capability for C#.
So far, so good. Right now I have basic completion working. There are 2 ways to request completion. The first cycles through all the potential matches. The second presents a popup menu of the matches. It works for types:
And also for local and instance variables:
I'm confronting two problems with x-popup-menu:
the popup menu can expand to consume all available screen space, when the number of choices is large. Literally it can consume the entire screen, and obscure everything else, including the entire emacs window and every other window.
The silly thing is, it's scrollable. First it expands to consume all available space, then it also becomes scrollable. Seems like it would make sense for it to expand to a certain point, and then become scrollable, rather than expanding to take all available space.
Is there a way I can limit the maximum size of x-popup-menu?
To specify the position of the popup menu, I pass in a position, and x-popup-menu uses that as the *middle*, not the left, of the top line of the menu. Why middle? who knows.
What this means is, if I specify (40 . 60) for the location of the menu, and the menu happens to be 100 pixels wide, the menu will extend beyond the left border of the emacs window. You can see this in the 2nd image above.
If I knew how wide the popup would be before specifying the position, I could compensate. But I don't.
Is there a workaround? Is there a way to get x-popup-menu to take its position as the LEFT rather than the middle?
Addendum: Doc for x-popup-menu
x-popup-menu is a built-in function in `C source code'.
(x-popup-menu POSITION MENU)
Pop up a deck-of-cards menu and return user's selection.
PO SITION is a position specification. This is either a mouse button
event or a list ((XOFFSET YOFFSET) WINDOW) where XOFFSET and YOFFSET
are positions in pixels from the top left corner of WINDOW's frame
(WINDOW may be a frame object instead of a window). This controls the
position of the center of the first line in the first pane of the
menu, not the top left of the menu as a whole. If POSITION is t, it
means to use the current mouse position.
Some people like Emacs because it doesn't provide popup windows (see e.g. this blog entry). The more "emacsy" way of presenting your list of possible completions is to show them in a split buffer. That way you would automatically avoid all of the above issues (screen real estate & scrolling) and would probably attract more of the die-hard Emacs users.
But that's pure speculation :-)
You can base your autocompletion backend on company or autocomplete where display of suggestions is handled for you.