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
Related
I'm currently working on a project that utilizes an MDI Form. What I would like to achieve is that when the user hovers over one of the menu options in the MDI menu, a ToolTipText appears describing what can be found in said menu. I'm aware of the fact that in some options for VisualBasic 6, ToolTip is supported. However, I can't seem to add this to the MDI Form, or add a label control for that matter. Has anyone ever run into this problem, and if so, is there a workaround or a solution?
Please let me know if you have any additional questions or comments. Thank you in advance.
I'm not aware that any true menus on a VB6 for (even non-MDI) have a tool-tip property; hence, neither does the MDIForm when one its child forms has its menu displayed.
However, there are a few controls that can be put on the MDI parent form. The most useful of these is probably the PictureBox, into which you can then place any type of control, such as CommandButtons. It must be "docked" to either the top or bottom of the MDIForm, using the PictureBox.Align property. Controls within the PictureBox can be located any way you wish, and can have their normal ToolTip properties set.
Another MIDForm-usable control that I've had good luck with is the ToolBar control, which comes in as part of the CommonControls component. Like the PictureBox, it has a .Align property to set it to the top or bottom of the MDIForm. You can put any reasonable number of "buttons" on it, and have reasonable control over their appearance (graphics, etc.); apropos the OP's query, you can assign a ToolTip to each button. It wouldn't be difficult to have the buttons change depending upon the currently-active form, just as the MDI menus normally do.
One other alternative that can be considered (but may be quite tedious to implement) could be reading the Mouse.X and Mouse.Y properties for each MDI menu and setting the captions of a Label control (or TextBox) using the Mouse Hover event.
You'd need to find the top left and bottom right points for each MDI menu and if it is within the box, you can show your label control with the intended caption. But note that you can't just put any controls on an MDI Form except maybe PictureBoxes, Toolbars and Coolbars, etc.
So the Label or TextBox control would have to be first placed on top of a PictureBox control which can be top aligned.
I would like complex button, which has several text elements and which should change their state and color depending on button state.
Unfortunately, I see that Xamarin button has only predefined image and text parameters.
How to have multiple controls inside a button in Xamarin?
Visual state manager(Only XF 3.0+) have three states: normal, disabled, focused which is named "CommonStates", or you can create custom states.Maybe it could help:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/visual-state-manager
I think you must read more in content view, where you can add labels into stacklayout or grid with your own api bindable property, then use it wherever you want in your code:
https://learn.microsoft.com/en-us/dotnet/api/xamarin.forms.contentview
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"
I’ve developed a VB6 application. Now I want to disabled resizing the form. I know there is a property Border style, which changes to fixed single, can do my work. But I want minimize button to my form. Minimize button is only in “Sizable” mode. I changed another property MaxButton to false. When I run my program, still I can re-size the form.
Please tell me how to disable resizing the Form.
Can't you just set the "MinButton" property to true on fixed-single border form. I can in my version of VB6.
I would like to use in my Mac App a mainwindow with a title bar with custom height (like sparrow, twitter app, reader for mac and others).
I´m using https://github.com/indragiek/INAppStoreWindow for this and it works perfect.
I would like to use also some custom sheets. The problem is that this sheets are open sliding from the bottom of the REAL titlebar that means the middle (more or less) of the new FAKE titlebar (and looks really bad).
Any idea how to change the point the custom sheets have to slide?
Set an object as the delegate of the NSWindow that the sheet is attached to, and implement the ‑window:willPositionSheet:usingRect: delegate method.
You can then modify the proposed position of the sheet and return a revised NSRect.
The rect that you return indicates the position, width and behaviour of the opening animation, it doesn't control the width of the resulting sheet.
Have a look at the docs about positioning sheets for more info.