Questions on formatting and clearing the rallymultiobjectpicker - rally

I am using the rallymultiobjectpicker to filter my grid but need some help on the following:
var cb = Ext.create('Rally.ui.picker.MultiObjectPicker', {
modelType: 'Project',
id: 'projectPicker',
matchFieldWidth: false,
editable:false,
emptyText: "Project",
//emptyCls: 'x-form-empty-field',
placeholderText: "",
loadingText: "",
width: 80
});
1: How do I clear the selected values (the combobox has the clearValue method)?
2: I am using a non editable ObjectPicker and setting the empty text. I want to format the emptyText to be white with a background color using CSS styling. The background color displays perfectly, but the text color stays gray no matter what class I use!
.x-form-empty-field {
color: #FFFFFF !important;
background-color: #085478;
}
4: How do I remove or hide the Search icon?
3: Is it possible to use a WsapiDataStore instead of a modelType as a data source?
I have struggled with this for days, any help would be much appreciated!

To clear the ObjectPicker selected values, ObjectPicker.setValue([]) works perfectly - thanks Kyle.
(I have opened a new question for queries 2and 4)

Related

Placeholder text in QML TextEdit

I am looking for a way to show a text hint stating the expected input as advice for the user. Take the Google search bar for example:
Is there a property I am missing, or is this something that has to be achieved through scripting?
The property doesn't exist on the Qt Quick input items. You can vote for the feature here.
In the meantime, you can use TextArea from Qt Quick Controls 2.
If you would rather use pure Qt Quick, you can do something similar to what the Controls do and add a Text item above the field:
import QtQuick 2.5
import QtQuick.Window 2.2
Window {
width: 300
height: 300
visible: true
TextEdit {
id: textEdit
width: 200
height: 50
property string placeholderText: "Enter text here..."
Text {
text: textEdit.placeholderText
color: "#aaa"
visible: !textEdit.text
}
}
}
This is kinda old but I found another necessity for Android builds.
Since Android only send the text editing signal after you press ok in virtual keyboard, the placeholder remains there. So to avoid it, I recommend:
TextEdit {
id: textEdit
width: 200
height: 50
property string placeholderText: "Enter text here..."
Text {
text: textEdit.placeholderText
color: "#aaa"
visible: !textEdit.text && !textEdit.activeFocus // <----------- ;-)
}
}
If you want one line input then why not use TextField ?

Change the width of text input in a Kendo UI grid with InCell editing

Basically, I have a kendo UI gri with InCell editing. This is what it looks like.
This is what it looks like when I edit a cell.
And this is what I want it to look like.
I don't even know if that's possible, but it's on my requirements list. Any ideas?
Yes You Can , Use the editor property
columns: [
{
field: "Your Field",
title: "Your Field Name",
width: "20%",
editor: function (container, options) {
$('<textarea data-bind="value: ' + options.field + '"></textarea>').appendTo(container);
}
},
as the Text area behaviour you can drag right and bottom to disable dag to bottom use below css
textarea {
min-height: 75px;
resize: vertical !important;
}

How to use CSS to change font color of emptyText

I am using a non-editable objectPicker and setting the empty text:
this.statePicker = Ext.create('Rally.ui.picker.MultiObjectPicker', {
modelType: 'State',
id: 'statePicker',
matchFieldWidth: false,
editable:false,
emptyText: "Select...",
placeholderText: "Select...",
width: 80,
listeners: {
select: this._getFilter,
deselect: this._getFilter,
scope: this
},
});
I want to format the emptyText (emptyText: "Select...",) to be white with a background color. Using the below CSS, the background color displays perfectly, but the text color stays gray.
.x-form-empty-field {
color: #FFFFFF !important;
background-color: #085478;
}
Ihave tried other classes but none change the font. It stays gray! Please help?
The 'emptyText' is applied to the field using the 'placeholder' HTML5 attribute. The answer is going to vary depending on which browser you are using.
Here is a guide that demonstrates how to style the placeholder text in the various browsers that support it: http://css-tricks.com/snippets/css/style-placeholder-text/
Here is some useful information about the placeholder attribute in general (also includes styling examples): http://www.hongkiat.com/blog/html5-placeholder/
Hope this helps!

How can I change the color a label on a bar chart?

Using the example from the docs Ext.chart.series.Bar it should be pretty easy to achieve this.
The series has a label config that contains a color properties. Changing this has no effect. Or am I missing something?
I would like to display a white text on top of the bars.
Working code for the example
http://jsfiddle.net/dfDb8/
On line 48 I try to set the color to white
label: {
display: 'insideStart',
field: 'data',
renderer: Ext.util.Format.numberRenderer('0'),
orientation: 'horizontal',
color: '#fff' //this is what I want to change
'text-anchor': 'middle'
},
Any ideas?
The following attribute:
fill: '#fff'
seems to work. I am not completely sure why though.

Link in Label BlackBerry 10

I am using JSON to receive data and place it into List. There is a Label displaying the text that I am receiving from the JSON. In some of the cases there is a Link in the text. By default you can't click on the Link from the label. Is there a way to make the Link to be clickable?
Label {
text: "Click here to open browser and get redirected to www.stackoverflow.com";
}
The output is "Click here to open browser and get redirected to www.stackoverflow.com" but the Link to StackOverflow is not clickable.
Use TextArea instead of Label and set property editable to false, it would look same as Label.
Don't forget to set inputMode to either Text or Chat.
TextArea {
text: "http://www.google.com"
editable: false
inputMode: TextAreaInputMode.Text
}
You can actually use HTML in the label itself to style the text as a link, according to the Text Styles documentation. You need to be aware of a few quirks though if you are going to apply any of your own styles, as discussed on the Blackberry Developer support forums here. The example below should work, using the default style which will colour the link blue, with bold and underline:
Label {
text: "<html>Click here to open browser and get redirected to <a href='http://www.stackoverflow.com'>www.stackoverflow.com</a></html>"
}
Note: you may need to set multiline: true on the Label in order to see all of the text, depending on your layout.
You should assign Text.RichText value to "textFormat" property of the Label:
import QtQuick 1.1
Rectangle {
width: 360
height: 360
Text {
text: "Click here"
anchors.centerIn: parent
textFormat: Text.RichText
onLinkActivated: {
Qt.openUrlExternally(link)
}
}
}