formfactor | HTML5 Form-factor detection
kandi X-RAY | formfactor Summary
kandi X-RAY | formfactor Summary
The "write once, run many" aspect of HTML5 means developers are building HTML5 apps for desktop, tablets, mobiles, TV, and so on. We don’t advocate a separate web app for every device ever, but we do think it’s sometimes nice to make a distinct interfaces for each major form factor. You keep your core app - most of the logic, markup, and styling - and you augment it with an "awesome layer" to target each form factor. You’ve heard of Browser Detection and Feature Detection. Form Factor Detection is a third way, providing an avenue to manage conceptually distinct user interfaces. It doesn’t eliminate the need for the first two approaches, but you use them in the context of a particular form factor’s interface.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- generate a string for the given key
- Recursively revives data to the given holder .
- Escapes quotes around a string .
- Try function .
- Formats an integer into a number .
- Gets global variables .
formfactor Key Features
formfactor Examples and Code Snippets
Community Discussions
Trending Discussions on formfactor
QUESTION
I have the following problem with using a custom style with a FMX TListBoxItem.
In the following code below, I have created four new styles to use in a TListBoxItem. All four styles show a box (TRectangle) with or without an X (TPath) in it and a TText to the right of it. In two of the styles, I show the X and the other two I don't. One style shows a green box with an X and text that is black and bold. One shows a empty box with just black text. The other two show the same thing but the boxes and the text are red, with the text for the one with the X in the box being bold.
In the program, I have a listbox with four listboxitems added during designtime to show the four different styles. I also have a button that will create an additional four listboxitems with code during runtime which also display the four different styles. All this works, except on one detail. The two red listboxitems that are created during runtime do not use the red font color. You can see this in the following image. ListboxItem1 and ListboxItem2 were created as designtime and are displayed with red text. "Item #1" and "Item #2" are displayed with black text but should be red. Note: "Item #2" does show the bold text correctly.
What am I missing when creating the Listboxitems during runtime that is keeping the red text from showing correctly?
Here's the code, form and styles I am using.
...ANSWER
Answered 2022-Mar-25 at 07:54Remove the line
vItem.StyledSettings := vItem.StyledSettings - [TStyledSetting.FontColor];
Your text is red in the style, but you're telling it to ignore the font colour of the style!
QUESTION
The problem that I am facing is, how to select some nodes that are on the same level as other different nodes and to sort just them and leave others intact. I've tried to match those by using template match, but can't figure out how to sort all of them without selecting any of descendants (for-each and apply-templates requires select...)
I have the following XML
...ANSWER
Answered 2022-Mar-19 at 22:35Here's one way you could look at it:
XSLT 1.0
QUESTION
I am using firemonkey Delphi. I have a Grid component and several edit boxes within a Listbox, each component occupying their own listboxitem within the listbox. My question is, when I scoll the listbox and my mouse moves over the grid component, the grid component captures my mousewheel scroll rather than the listbox. What I want to achieve is for the scroll function to remain with the listbox and only scroll the Grid when it/cell is clicked. If I set grid hittest to false it works fine but how do I go about detecting when my mouse is over the grid component to capture any mousedown events to reactivate the Grid for scrolling?
Here is the form I am using
...ANSWER
Answered 2022-Feb-02 at 10:52Set property Grid1.DisableMouseWheel := True
in designer.
Then on Grid1Click
set Grid1.DisableMouseWheel := False
and
again on ListBox1Click
set Grid1.DisableMouseWheel := True
.
QUESTION
I'm using Delphi 10.1 and have a Multi Device application.
I'm loading a image onto a TRoundRect control where the user can draw directly onto it.
My question is how do I copy the RoundRect Image and whats been drawn on it to a TImage?
This is the form:-
...ANSWER
Answered 2021-Dec-21 at 16:38The picture is being stretched, but the path object is not, so when it gets drawn on the TImage it will be stretched with the picture and have the wrong scale. You also hadn't set the stroke thickness for drawing the path. The following is one solution to scale the drawing of the path to match the picture. Math.Vectors is needed in uses. Tested in Delphi 10.4.
QUESTION
We equipped a library package with a *Config.cmake file, following step 11 of the CMake tutorial. Yet our downstream software fails to find the library.
Our package is called "formfactor" [https://jugit.fz-juelich.de/mlz/libformfactor]. It provides a shared library (libformfactor) and some header files.
Our downstream code uses
...ANSWER
Answered 2021-Dec-01 at 10:46The script formfactorTargets.cmake
, generated by CMake via
QUESTION
There are several cases where forms or dialogs that should be modal are not staying on top. I'm building for Windows using 10.4. Here's a simple example involving two forms and a TSaveDialog.
To replicate the issue:
- Run the application in Windows
- Click the Show Window button (you should see Form2)
- Click the Show Save Dialog button (you should see the save dialog)
- Click another window that is not part of the application such as an Explorer window
- Click Form2. Form1 will now be in front
If you repeat this but maximise Form1 first then it's not easy for the user to resolve without closing the program from Task Manager or using some expert windows knowledge.
Form1:
...ANSWER
Answered 2021-Nov-30 at 18:10You could set the FormStyle
of Form2
to StayOnTop
FormStyle is one of the Normal, Popup, or StayOnTop values defined in TFormStyle.
Normal: Usual form. Such form can have the active state and support the z-order.
Popup: Such form cannot be active. All forms of this type belong to the PopupForms list.
StayOnTop: This form remains on top of the desktop and of other forms in the application, except any other form that also has FormStyle set to StayOnTop. If one StayOnTop form launches another, neither form will consistently remain on top.
https://docwiki.embarcadero.com/Libraries/Sydney/en/FMX.Types.TFormStyle
QUESTION
I want to display different Types of Objects (same supertype) in the same Grid. I want them rendered as Cards, with the help of Template Renderer. Suppose I want to build a webshop for PC-parts.
I would have an abstract Class AbstractPcPart
.
ANSWER
Answered 2021-Oct-12 at 12:41You can use conditional templates to a degree. The template gets stamped if the
isSomething
property is truthy. So you can use something like
QUESTION
I have a ScrollBar with mouse events assigned to onChange, onMouseWheel and onMouseUp. The onChange and wheel events work fine, but the onMouseUp event does not fire. Drilling down to the TControl method on debug, I noticed that the event variable (FOnMouseUp) is nill. The event is assigned in the IDE and I put it in the onCreate event of the form, plus I tried assigning it in various other places after the form is created, but to no avail. What gives?
Here is a simple reproducible example, in which all three scroll bar mouse events do not fire:
...ANSWER
Answered 2021-Oct-06 at 12:59The reason is that the scroll bar contains child objects such as a track, a thumb and min and max buttons. It's these objects that respond to mouse events, not the parent object. So the solution is to set your mouse events to those objects. The problem is that those object are protected, so you'll have to create a new Scroll bar class that sets those events. The child objects don't yet exist in the TScrollBar constructor, so the best place to assign them I've found is on the first paint event.
I asked almost exactly the same question a couple of weeks ago. See my own answer here.
FMX: TScrollBar MouseDown and MouseUp events not triggering
Here's your example, which now works. I've also replaced your one label with 4 labels to make it easier to see which events get called.
New scroll bar class that does respond to mouse events:
QUESTION
I have a form with at TListBox that I populate in the onCreate event, where I also set the selected item. I want the List Box to have the selected item in view when the form shows, so I tried firing the ScrollToItem
method. This does not work. I also tried putting it in OnShow
and OnActivate
events, but it still does not work. Is there a way to get this to work?
Here is a sample program that illustrates the problem:
ANSWER
Answered 2021-Oct-06 at 11:34TListBox
has a property ViewportPosition: TPointF
that sets the scrollbars. Add the following line after you set ListBox1.ItemIndex
:
QUESTION
I have a FMX App that has listviews on different pages of a tabcontrol. When switching tabs I dynamically fill and format the list entries e.g. by changing the vertical placement. When a listview is shown at the first time the items are shown at the wrong position. Happens the same on Windows or Android with Delphi versions Seattle and Sydney.
My question is: Is there anything that I can (or have to) do to initialize the listview after adding the items?
To reproduce my problem, you can create a new 'FMX Header/Footer with navigation' application. On the second tab add a client aligned listview an add the following code in the tabcontrol onchange handler:
...ANSWER
Answered 2021-Jun-23 at 16:20If you are not using styles in your project, insert a call to:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install formfactor
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page