Space and/or title between dialog elements?
Soto
Posts: 1,440
Hi.
This probably will sound too basic, but I can`t seem to find out how to do it.
I have a dialog box with a slider and two buttons and they all have a common function. It all works and thought that was going to be the ticky part.
Now I`d like to include the same three elements doing another similar fuction, but separated by a tittle or at least a space between them to avoid confussion. Something like this:
Title 1
---------------
[ ] [ ]
Title 2
---------------
[ ] [ ]
I only managed to add text, but it ended covering the slider.
I would appreciate some tips for this.
Comments
You use setGeometry (x,y,width,height) on the widgets to set their position and size.
Thank you! I ended doing something similar to what I wanted with margin and space, but knowing how to do it this way is much better and just what I wanted. :)
How do people learn to code for DAZ Studio? Is the code based on something else and people have prior experience with that? Because I am trying to catch up with what I read in the documentation center and the forums and I`m making progress, but I fail to find a begginers explanation on how things work.
Well thanks again for the example, it will come in handy for sure!
Be aware that using explicit pixel sizes like that (the setGeometry calls) could be problematic as DS is developed to handle UI scaling for high DPI displays and the like, something we know is being worked on.
Would this be a problem even if each widget had the pixel measurements? Surely in that case all errors would be relative and thus cancel each other out.
I don't know, since I don't have access to the development builds being used for this, but it depends - can you adjust fonts to fit the sized widgets? If not then you risk clipping the text of any labels. Even if you can be sure that everything will fit, it still risks the dialogue seeming microscopic relative to the rest of the UI.
Well, there is a PixelSize property for Font, and font is a property for DzWidget, so maybe that's the solution - if it's a problem.
The warning about using those methods came from Rob.