Set fixed sizes to custom style button in Firemonkey project - css

For my Firemonkey multi device project in Delphi 10 Seattle i've created a .style sheet with multiple button styles which contain an image. In order to show the image the right way I want to set a fixed size for the button if the styles are set.
Like if you give a button the stylelookup additemstyle it will have width and height of 48 and you can't resize the button. I want to do the same.
How can I accomplish this? I've already tried to lock the style component and set the size there, but I can still resize the button.

Related

How to Resize Properties Window in TinyMCE 4.x?

I would like to resize the property window (e.g. when we click on "Table Properties") of TinyMCE 4.x. In the image shown below, the table properties window gets squeezed in terms of width and the labels get overlapped. I looked at the DOM nodes, and most of the widths and heights properties of the container windows, labels and inputs are set dynamically using javascript. Is there a way for us to change the size of these property windows?

can you make material ui tab responsive?

Is it possible to make the material ui tab react component responsive?
Documentation of MATERIAL UI TAB
Say I have multiple tab items with a search bar like below
I want to make the input component stretch the whole width of the screen for mobile view (screen less than 500px)
I tried putting width: 100% on the tab with media queries but it didnt work.
I also wanted to remove the focus effect when i click on the search component which is illustrated below
To summarise
1 ) I want the input component to stretch the whole width on smaller screens
2 ) I want to remove the focus effect when clicking the first tab(search component)
This is a working example, forked from your codesandbox: https://codesandbox.io/s/material-demo-fpfw5?file=/demo.js.
Basically I changed something for only screen sizes smaller than 600px:
First, set "max-width" and "width" for first tab to "100%".
Second, set width for input inside tab1 to "100%.
Last, add disableRipple attribute to first tab.
One thing, I use the default breakpoints of Material-UI, which defined here: https://material-ui.com/customization/breakpoints/
If you wanna change to 500px, just define your own breakpoint.

How to restrict growth (size) of layout in Qt Designer?

When I maximize my window, I want to restrict a vertical layout (and the entire row below it also) so that it has a specific size (lets say a width of 200). How can I achieve this? Below is what I get now. The buttons are stretched too far. I want them to keep a width of 200.
To stop the buttons stretching, use the following steps in Qt Designer:
click on scrollArea in the Object Inspector
click on Break Layout on the toolbar
click on scrollArea in the Object Inspector
click on Lay Out in a Grid on the toolbar
click on scrollAreaWidgetContents in the Object Inspector
scroll down to the bottom of the Property Editor
change layoutColumnStretch to 0,1
These steps should remove an empty column from the scroll-area grid-layout, and make the second column stretch to take up the available space when the window is resized.
You just need to restrict the maximum width of all widgets (in this case the buttons) within the layouts of this grid column to the expected size, else they'll just keep expanding. You may also have to fiddle the horizontal size policy; I seem to remember that buttons were a bit tricky in this regard (or was that the height?), but can't test it right now.
The layout size contraint you tried only applies to the layout's direct parent widget, if it has one, which isn't the case for the vertical layouts here.

Why the layout in qt avoid to show full image of background image for pushbutton

I have problem with layout. I put image for QPushButton background but when I add my button to each layout, it avoid to show full image.
Use size Policy and minimum Height-width. for example you want to expand the button. first select the button and after that choose size Policy to change the size. select Expanding for each property(vertical|horizontal Policy) you want to change. Also you can set the vertical|horizontal stretch. if you want to set limit for it's size you can set minimum and maximum size for your button.
Just look at your object properties, Also look at here. :)

moving image in a div by mouse draging and generating the css dynamically

I want to implement an image/div drag functionality like the one in the tinymce,
when the user click on the image, its border are selected and one can move the image/div around in the editor, and in the meanwhile it generate inline css as well..
Thanks...
You probably want something like jQuery UI's draggables, which allows you to make dragging movements with your mouse which will alter the dragged element's CSS accordingly. Use the start and stop events if you want to change the border color when it is being dragged.

Resources