I want to put a Label and an Entry widgets on the same line and center them.
I saw on multiple posts that to center, pack() method was easier. But, to put on the same line, it's grid().
With grid(), I suppose I have to build all the layout, then center it. Is there a way to do it on the go? With pack(), I don't have any idea.
But, I want to do both at the same time. I didn't find any answer :/
If someone can help me, I will be very grateful!
I have to put everything in a frame and pack() the frame.
Thanks to #acw1668
Related
I'm generating Views inside FlexBox layout by pressing the Start button. As you can see every item on even line has random size. It works almost as it supposed to be but there is a problem, I need to get rid of vertical gaps between two vertically adjacent views. I've tried all properties of Flex Box Layout but didn't find one that can help to solve my problem. I will be happy if you help me to solve this problem.
I've solved this problem. If you have the same task you should use Relative Layout and its' flags inside your android code. It'll give you all control under the positions of Views. If it will be necessary I can expand this answer to provide more detail.
I hope someone can help me out with this.
I have a pyqtgraph context menu and want to add my own Z-Axis. I can create a qlineedit widget but I am not able to create multiple widget on the same line in the context menu as show below (e.g. radio button and 2 text boxes on same line)
As a minimum I would like to achieve:-
Z Axis -> [input value], string, [input value]
I've had a look in qmenu but couldn't find what I needed. Anyone know how to achieve this.
Also if anyone knows how to change the size of the X Axis qlineedit boxes and make them bigger it would be great as they are a bit squashed as you can see.
Someone on a different forum was able to help me with the answer so I thought I would also post it here for future users.
What you have to do is go into the site-packages for python and find pyqtgraph/graphicsItems/ViewBox/. In there are several files called
axisCtrlTemplate_*.py
A couple of lines down in the ui_form is the following line which you just need to increase the width (e.g. 450)
Form.setMaximumSize(QtCore.QSize(450, 16777215))
Hey presto fixed.
Also in the same location is a file called
ViewBoxMenu.py
you can see how the context menu is written here and I will use this information to create my min and max values which are created in a ui (qtdesigner) and then added to the menu
With my friend we are trying to make some game. When we draw a grid or checkerboard and then move objects by arrows, "panel.Refresh();" refresh all the objects, obviously the complete panel. Can we somehow refresh just that objects, which are supposed to move? We tried to make two panels. First panel generates the grid and the second one generates the object which is supposed to move, but when the object moves, the panel with the grid blink whenever the panel with object takes refresh. Can someone help us please? Thank you so much.
You should try to add some code so anyone can help you. By just your text we can hardly get a glimpse of what you want and mean. Try to create a small compiled program that works like the problem you are posting here with only what is strictly needed to reproduce your problem and post the source code here.
Is it possible to reproduce what is on the picture below in ListView, padding/margin icon to the right.
http://img801.imageshack.us/img801/4043/listview.png
My first question here, so I couldnt post the picture here.
Basically I need to move the ListView icon more right, I am reproducing file/directory browser, so the fails that are in a directory need to be below them and slighty right like in the picture, I have everything else figured out.
You should be using a TreeView control:
http://msdn.microsoft.com/en-us/library/1dtsdfkx.aspx
But if you insist on hacking a ListView to render this way, you'll simply have to take over drawing each row yourself. You can do so using the OwnerDraw property, though be warned that there's a lot of corner cases here so you should do a lot of reading to see what people have had to deal with when implementing this:
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.ownerdraw.aspx
I am trying to spawn a ball in the world dependant on where the player (box) is at the time. to do this i need to know the position of the box and when i press a button the ball shall appear in the center of the top face of the box.
So for this i would need to be able the Y axis of the position also, and after searching online i cant find anything for help.
Anyone know how to help me with this?
Thank you.
It's very difficult to give you an accurate answer without any code.
However something along these lines is what you are aiming for:
NxVec3 ballSpawn = box.getGlobalPosition();
ball.setGlobalPosition(NxVec3(ballSpawn.x, ballSpawn.y+boxHeight, ballSpawn.z));
The PhysX SDK Documentation has an excellent search function for the basics.