This works fine with a text field:
<TextField id="txtNick" paddingLeft='15' top='10' maxLength='20' width = '300' />
However the following code does not work in a text area:
<TextArea id="txtAbout" maxLength='250' paddingRight='10' top='10' width = '300' borderStyle="Ti.UI.INPUT_BORDERSTYLE_ROUNDED"/>
Any idea how to achieve padding? Cheers
You can't with single TextArea. but you can:
<View height="Ti.UI.SIZE">
<TextArea left="10 right="10" />
</View>
Related
I am using mui date picker and i want to customize it but css is not working on it i tried inline style as well as external styling by giving className but it dosent work
I want to change its height
<DatePicker
sx={{height:'35px'}} //its not working!!
label="Due Date"
className="DatePicker"
renderInput={(params) => <TextField {...params} />}
value={selectedDate}
onChange={(newValue) => setSelectedDate(newValue)}
/>
You have to apply the style by using the sx property in the <TextField> component and target the element with class .MuiInputBase-input.
Below is the code you need and here is the codesandbox to play with.
<DateTimePicker
label="Due Date"
className="DatePicker"
renderInput={(params) => (
<TextField
sx={{
"& .MuiInputBase-input": {
height: "80px" // Set your height here.
}
}}
{...params}
/>
)}
value={selectedDate}
onChange={(newValue) => setSelectedDate(newValue)}
/>
use an other type of date picker instead. for example StaticDatePicker for large height data picker
<StaticDatePicker
value={selectedDate}
onChange={(newValue) => {
setSelectedDate(newValue);
}}
renderInput={(params) => <TextField {...params} />}
/>
I'm using NativeScript-Vue to build some app. Trying to figure out how to control the size of my buttons. For instance, i have this code:
<StackLayout orientation="horizontal">
<Button
class="fas"
:text="'fa-upload' | fonticon"
#tap="()=>{backupImage(image)}"
></Button>
<Button
v-if="image.taskStatus==='pending'"
class="far"
:text="'fa-window-close' | fonticon"
#tap="()=>{cancelImageBackup(image)}"
></Button>
</StackLayout>
The result is this:
I would like to remove the large "empty" gray area, on both sides of the icon. I see that native script doesn't support max-width. Tried also padding. How can it be done?
For some reason, works with a StackLayout around it
<StackLayout>
<Button text="LOGIN" class="-rounded-sm bg-primary" width="100dip"></Button>
</StackLayout>
How to add icons to a TextField with NativeScript like you can see on the image: here
My xhtml code:
<StackLayout>
<Image src="res://logo_login" stretch="none" horizontalAlignment="center"></Image>
<TextField #username class="input" hint="GEBRUIKERSNAAM" [(ngModel)]="user.username" autocorrect="false"
autocapitalizationType="none"></TextField>
<TextField #password class="input" hint="PASWOORD" secure="true" [(ngModel)]="user.password"></TextField>
<Button class="btn btn-primary btn-login icon" text="\e912 INLOGGEN" (tap)="login()"></Button>
<button class="btn btn-forgot-pass" text="PASWOORD VERGETEN?" (tap)="forgotpass()"></button>
Check out icon fonts for NativeScript:
https://docs.nativescript.org/ui/icon-fonts
"...
Follow the instructions on the icon font webpage to determine the hex codes of each font glyph, i.e., icon. Add a Label component to your NativeScript app and bind the Label's text property to a one-letter string generated from the character code of the icon you want to show, i.e., String.fromCharCode(0xe903).
..."
I believe this is what you're trying to do.
You can wrap your TextFields in a StackLayout with a horizontal orientation like
<StackLayout orientation="horizontal">
<!--Your password TextField-->
<TextField
#password
class="input"
hint="PASWOORD"
secure="true"
[(ngModel)]="user.password"
></TextField>
<!--You can then place the icon-->
<Label class="fa" text="" (tap)="toggleShow()"></Label>
</StackLayout>
I need to align columns in <form:SimpleForm>. I need 4 columns in a row but only 2 columns are aligned. Here is my example, Please refer JsBin
Needed output :
label input-field label input-field
current output :
label input-field
label input-field
To use a new container on the right, simply set an empty title.
But be aware tabbing won't be from left to right, top to bottom but (per container) top to bottom, left to right
After all, it just a SimpleForm ;-)
See this working example (please run the example full-page, otherwise it will still show the fields top-town because of the responsive nature):
sap.ui.controller("view1.initial", {
onInit : function() { }
});
sap.ui.xmlview("main", {
viewContent: jQuery("#view1").html()
})
.placeAt("uiArea");
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-libs="sap.m"></script>
<div id="uiArea"></div>
<script id="view1" type="ui5/xmlview">
<mvc:View
controllerName="view1.initial"
xmlns="sap.m"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc">
<f:SimpleForm
maxContainerCols="2"
editable="true"
layout="ResponsiveGridLayout"
labelSpanL="4"
labelSpanM="4"
emptySpanL="0"
emptySpanM="0"
columnsL="2"
columnsM="2">
<f:content>
<core:Title text="A Title" />
<Label text="1st label" required="true" />
<Input value="Blah" />
<core:Title text="" /> <!-- empty title so it looks like this container belongs to the left one -->
<Label text="2nd label" required="true" />
<Input value="Blah" />
</f:content>
</f:SimpleForm>
</mvc:View>
</script>
i'm using jqgrid asp.net component .how can i change a filed width and height (text box or combo) in add and edit dialog boxes?
Thank you
At the last im found it
1 you need to specify edittype attribute
2 after that specify editfiled attributes tag
for text area
<trirand:JQGridColumn DataField="Remarks" HeaderText="Remarks" Editable="true" EditType="TextArea">
<Formatter>
<trirand:CustomFormatter FormatFunction="formatRating" UnFormatFunction="unformatRating" />
</Formatter>
<EditFieldAttributes>
<trirand:JQGridEditFieldAttribute Name="cols" Value="80" />
<trirand:JQGridEditFieldAttribute Name="rows" Value="6" />
</EditFieldAttributes>
</trirand:JQGridColumn>
for text box
<trirand:JQGridColumn DataField="Design" HeaderText="Design" Editable="true" EditDialogFieldSuffix=" (MAX - 10)">
<Formatter>
<trirand:CustomFormatter FormatFunction="formatRating" UnFormatFunction="unformatRating" />
</Formatter>
<EditFieldAttributes>
<trirand:JQGridEditFieldAttribute Name="size" Value="2" />
</EditFieldAttributes>
</trirand:JQGridColumn>