I am trying to add a TRectangle object to a Firemonkey control in the style designer to give the control a background color. I can add the TRectangle and size it manually, however then the style does not work if the control changes size in the designer. Is there a way I can make the TRectangle automatically take up the size of it's parent control?
Please make sure that property "TRectangle.Align" is set to "Client"
Related
I am building and maintaining a Win32 app using Visual Studio.
I have recently edited the .rc file adding WS_THICKFRAME to my dialog STYLE line for all dialog windows to allow them to be resizable.
My current problem is, when I resize a window, its content remains fixed to the left. How can I make the window's content remain centered when resizing using the border?
Pointing to any relevant documentation on this would also be helpful, as I have not had lucky finding that.
If you only want to reposition (rather than resize) the individual controls, an easy way would be to create a non-modal container dialog to hold the controls, make that dialog a child of the resizable dialog, and then when you handle WM_SIZE for the outer dialog, you only have to reposition that one non-modal dialog.
Your new position is ((newWidth- controlDlgWidth) / 2, (newHeight-controlDlgHeight)/2), where controlDlgWidth, controlDlgHeight are the width and height of the child dialog.
I say to use a non-modal dialog for this, so that you can continue using a resource script, rather than needing to add a whole bunch of explicit CreateWindow() calls.
I'm making an FMX app for Win32 (one form only) with C++ Builder 10.2 update 3. How can i change the form's background from grey to white? I can't edit the form's style like i can other controls.
I tried the following based on this but it had no effect.
Form1->Fill->Color = TAlphaColor(TAlphaColorRec::White);
I know i can just add a TRectangle to the form (aligned to client with HitTest false) and just set it's color. But i'd rather just use the form itself if not overly complicated.
thanks,
russ
I am trying to create an interface for my application using Qt Designer. I want it to have a tabbed, ribbon-style set of controls at the top, and a MDI-style area with docked windows which I plan to show and hide depending on which tab of the ribbon is currently selected. I am just beginning with Qt Designer as well as Qt4 itself for that matter so I'm not quite sure how to setup the window, which widgets and layouts should I use etc.
It's quite obvious there should be a QTabWidget at the top, but I'm not sure about the bottom. Should I use a QFrame? A QMdiArea? A dock widget? What layouts can I use to make sure the tab widget has a fixed height, occupies the whole width of the window at all times and the bottom area scales as the window is resized?
I've read in the manual that splitter layouts allow for manual adjustment of the size of the widgets they contain, but I can't drag the box size of a widget after I place them inside a splitter. Thus I'm unable to setup the area below the ribbon. Anyone, help?
You should look into the QMainWindow and check the multiple utilities it can provide you (Toolbar, StatusBar, DockWidgets, CentralWidget, etc...).
The way I understood your case is that you will always have the MDI Area visible, and that the tab bar will only be used to change the dockWidgets. Here's how I would do it.
The centralWidget of the mainWindow would be a QWidget with a QVBoxLayout containing a QTabBar widget first (up) and a QMdiArea under it. The sizes should be handled automatically.
This will allow the user (or you) to dock widgets on the left, bottom, top or right areas of the mainWindow's central widget. Keep pointers to the dockWidgets to be able to move and show/hide them at will.
Hope this helps.
VTK Designer, which is built on Qt, has a Ribbon-ish interface. You might take a look at the source code for reference.
Is it possible to make an NSColorPanel 'Pop Up', almost like a popup menu, from the NSColorWell?
I don't like how it's implemented as a palette, as it's sometimes not obvious which NSColorWell it's associated with.
Thanks!
MT
No, you'd need to create your own color inspector and color well. To get it to pop up above your existing control, you'd need to create a child window and attach it to your existing window. The color palette controls would go in the child window.
However, I'd recommend you avoid doing this. The existing color palette mechanism is time-tested and works across multiple applications.
SketchFlow allows for the changing of the Height property for the TextBox and ListBox controls. However, I seem to be unable to change the Height property for a ComboBox. The Height property can be changed in the Properties window but it has no effect (at design or run time).
You shuold open sketchstyles.xaml in notepad or visual studio. Then find the style for combobox-sketch. You will find 2 places(once in outermost grid definition and another in the end) of min-height in the style, set them both to what you want.
Are you sure you have the combobox item selected in the Objects and Timeline panel? I tried this and it works fine for me. Are you able to resize it using the mouse and adorners?