z-order

How to set Z-order of a Control using WinForms

假如想象 提交于 2019-12-27 12:05:22
问题 I'm writing a custom TextBox that upon gaining focus changes its border style. As adding a border causes the control to overlap with those neighbouring it, I temporarily bring the text box to the front of the dialog (using textBox.BringToFront() ). However, once editing is complete and focus is lost, I would like to send the control back to its original position in the Z-order. Is this possible (preferably in a simple way!) 回答1: Call the GetChildIndex and SetChildIndex methods of the parent's

How to add buttons and JPanels to a ZOrderComponent?

走远了吗. 提交于 2019-12-25 10:05:09
问题 I'm trying to create a JFrame with a background image, a JLabel over the background image centered and toward the bottom, with two buttons on the right and left that say "Stay" and "Leave". This is already created. The issue arises with the order of each of the items. I cannot get the JLabel with text and buttons over the background image, with both of them showing. Here is my code; any advice would be appreciated. Thank you in advance. public class SceneOne { public static void main(String[]

Cartopy coastlines hidden by inset_axes use of Axes.pie

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 07:04:25
问题 I am producing a map of the world with pie charts in individual model grid boxes. I make the map and coastlines using cartopy. The pie charts I produce using inset_axes. Unfortunately the pie charts hide the coastlines and I'd like to see them clearly. Minimum working example: import cartopy.crs as ccrs import numpy as np import cartopy.feature as feature import matplotlib.pyplot as plt def plot_pie_inset(dataframe_pie,ilat_pie,ilon_pie,axis_main,width_local,alpha_local): ax_sub= inset_axes

C# Z Order of All Open Windows

青春壹個敷衍的年華 提交于 2019-12-24 04:35:48
问题 I am interested in getting the Z order for every window currently open by the user. For example, if they had 4 windows on top of each other, I'd like to know (by window title - which I can already get), the order - i.e. which is deepest in the stack and which is at the front of the stack. Does anyone have an idea as to the code for this? I've been looking at GetTopWindow() and GetNextWindow() but GetTopWindow() seems to return the top window within an application and GetNextWindow() doesn't

In matplotlib, Is there a way to set gridlines below bars/lines/patches while retaining ticklabels above?

不想你离开。 提交于 2019-12-24 04:12:30
问题 Related to Matplotlib: draw grid lines behind other graph elements, but nothing there worked for me. I have the following plot where I want to hide the gridlines under the red line while retaining the labels on top of the red line: import numpy as np import matplotlib.pyplot as plt #plot r = np.arange(0, 3.0, 0.01) theta = 2 * np.pi * r ax = plt.subplot(111, polar=True) ax.plot(theta, r, color='r', linewidth=20) ax.set_rmax(2.0) ax.grid(True, lw=2) #set labels label_pos = np.linspace(0.0, 2 *

wxPython: Making a frame be on top of everything

妖精的绣舞 提交于 2019-12-23 18:13:05
问题 I want my frame to be always on top, but I want it to be really on top. I want no other windows to hide it, even if they are also "always on top". I'm using wx.STAY_ON_TOP and wx.FRAME_FLOAT_ON_PARENT , but still there are windows that appear on top of mine. Also, the taskbar appears on top of my frame, while I'd like it to be behind my frame. I've tried a lot of things that didn't work, detailed here. Any idea how to make my frame really on top? 回答1: Because their is no standard method in

Don't bring button to foreground on click

北城余情 提交于 2019-12-22 04:59:36
问题 My app currently looks like below. Three Button s in a RelativeLayout , the middle button has negative margin left and right to overlap the other two buttons. Issue : When I click either the left or the right button, it gets to the foreground for a second and overlaps the middle button, which looks very ugly. <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal"> <Button android:id="@+id/voices" android:layout_width

How can I map click events to elements in multiple layers?

若如初见. 提交于 2019-12-21 05:33:10
问题 I have multiple SVG elements that are in separate groups. They overlap each other. Example: <svg id="board" width="100%" height="80%"> <g id="terrain" class="layer"> <path d="M-32,-32L32,-32 32,32 -32,32Z" transform="translate(0, 0)" class="mote terrain hill"></path> </g> <g id="guy" class="layer"> <path d="M-21...Z" transform="translate(192, 448)" class="mote guy"></path> </g> </svg> When an x, y position that matches both is clicked, I want to know all that both were clicked. If I bind each

View bring to front doesnt work

扶醉桌前 提交于 2019-12-20 17:05:08
问题 I want to change z order of some views during animation On Androids above 4.1.2 it works just fine, and on androids below 4.1.2 the Z order doesnt change, the top view remains on top. This is what i am trying. myView.bringToFront(); ((View)myView.getParent()).invalidate(); How to make it work on older devices ? 回答1: /** * Change the view's z order in the tree, so it's on top of other sibling * views. This ordering change may affect layout, if the parent container * uses an order-dependent

How do I let my matplotlib plot go beyond the axes?

£可爱£侵袭症+ 提交于 2019-12-18 12:47:40
问题 I have to translate an image plotting script from matlab to matplotlib/pylab, and I'm trying to achieve the same effect as the matlab image below: As you can see, the z order of the plots seem to be higher than the z order of the grid, so the markers are not hidden by the axes. However, I can't figure out a way to do the same with my matplotlib image: I'm wondering if it is possible to get the same display without having to increase the limits of the y axis. 回答1: To get the marker to show