I want to center the dropdown item vertically on the appbar but the shadow looks annoying even after trying to match bg colors.
This is my kivy string text
MDDropDownItem:
id: drop_item
pos: appbar.pos[0] + dp(20), appbar.pos[1] + dp(30)
text: "All Dose"
font_size: "23sp"
on_release: app.menu.open()
You can use any kind of button to trigger the drop down menu. Then open the menu when it is clicked.
I use a MDFlatButton that has no shadow. You can customize it as you like.
MDFlatButton:
id: drop_item
text: "All Dose"
pos: appbar.pos[0] + dp(20), appbar.pos[1] + dp(30)
font_size: "23sp"
on_release: app.menu.open()
Related
Currently struggling with trying to update a SharePoint custom page with a search bar. The page consists of a data table with various columns, the idea is to add extra functionality to this data table without compromising the code already there.
The main issue is the code not rendering "search" when added to the following area after "excel":
data-toolbar='[
{ template: "<a class=\"k-button k-primary\" data-bind=\"click: onCustomCreate, visible: canAdd\">Add New Organisation</a>" },
{ name: "clearAllSorting", text: "Clear All Sorting", attr: "data-bind=\"click: onClearAllSorting\""},
{ name: "clearAllFilters", text: "Clear All Filters", attr: "data-bind=\"click: onClearAllFilters\""},
"excel"
]'
I have put in "pdf" to test, and it renders the Export to PDF button OK:
PDF button
When I add "search" it just shows a box with lower case s for search:
Search button
I'm hoping someone can point me in the right direction, is it simply missing a more up-to-date kendo library?
Ultimately, all I need is for this to show: Search toolbar
I want to design 3 dots in qml using Text and Rectangle as shown below;
... Hello World ...
But my requirement is 3 dots should lie at the middle of the rectangle and the text (Hello World) as shown in the image. How this can be achieved?
When I thought first time, 2 approaches came up in my mind:
1- Using the middle dot by the help of html code styles can achieve this. Here is the HTML codes which you can easiy use in qml.
Here is the example and output:
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Rectangle{
id:sample1
anchors.centerIn: parent
width: 200
height: 50
border.color: "black"
Text {
id: mytext
anchors.centerIn: parent
textFormat: Text.RichText
text: "·" + "·" + "·" + " Hello World " + "·" + "·" + "·"
}
}
}
Output:
2- You can put the "Hello world" text first then you can create another text for dots and put the dots in the mid coordinates beside the main text. This method is not a beautiful approach.
Note: When I dig into to other possible solutions, I couldn't see a proper solution to achieve this.
I want to select a region of the text with the mouse.
TextEdit {
id: edit
anchors.fill: parent
font.pixelSize: 18
focus: true
wrapMode: TextEdit.Wrap
text: "bla bla"
}
i can select with the keyboard and clicking with the mouse give focus, but i cannot select a region of text with the mouse.
is this possible. thanks!
Found it!
selectByMouse: true
wasn't the default.
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;
}
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)
}
}
}