I've looked through every single widget on glade trying to replicate this "box/table" style seen here on Settings:
But I haven't found anything like it anywhere on Glade or on the official docs :(
The closest I've come to replicating it is through a frame without a label and with separators and custom css that changes the background color to #base-color, and although it kinda works alright in some themes:
In others it just plain doesn't work:
And I'd imagine that with more elaborate or complex themes it will look even worse.
So my questions are: What is the name of this Widget shown in these pictures? And if it does not exist or is not available in Glade, is there a way to replicate it more reliably than what I've shown here?
It is called a GtkListBox. As you can see, it takes any other widget as a child. So you have to add rows to the ListBox and then add widgets to each row.
Here is an example in Python.
Related
I'm new to flutter and I need an editor that can format certain words (e.g., automatic URL detection and formatting it to blue inside the editor). So far, I have not found a plugin for that so I decided to write my own plugin.
The question here is: where do I start?
I've tried using a Rich.text() with TextSpan as children but I can't edit those children. I've tried using a SizedBox with inside of it an EditableText but I encountered 2 problems.
The fontSize of EditableText always differs from the fontSize of a TextSpan, no matter if I apply the same TextStyle (this really frustrates me)
The whole Rich.text() doesn't work as a single editor, which is what I'm trying to achieve.
Could someone point me into the right direction? Thanks in advance!
I have been struggling with this for a couple of days. I want to display a few university lessons in a flutter app. I used the Text widget, but it's not sufficiently customizable. If I want to make one single word bold in the entire paragraph, I can't do that. I tried the RichText widget, but that was a pain in the neck, I would have to create a new TextSpan everytime I want to customize a piece of the paragraph somehow.
Before you say markdown, I gave that a try too. But I can't change the font size, it's small and not so easy on the eyes. I did check the docs on Github, but there doesn't seem to be enough flexibility, you can't resize or align text.
I am left with one option, which is to use an HTML view plugin. I tried importing that, but now it's giving me an error.
If you know any tricks on how to customize text, hopefully within flutter, not using HTML/markdown, I would really appreciate it. Any suggestions on how to make my life easier are welcome!
I'm confused by the showcase example of Cell List. Shown below is a screenshot, when I inspect the element I can see a png image is used to give a blue background for the selected cell. I cannot find any reference to such an image or css file from its source code here or from google-code. I couldn't find any injection of css or things like that as mentioned in related sof answers. Please show me where the code is or some other example code. I'd like to know how this exact scenario works, not an alternate solution to get the effect. I'm pretty new to gwt, I'm sure this is a piece of cake for the veterans out here,any clues?
It's the default styling for the CellList. You can use your own by passing a CellList.Resources to the CellList constructor.
I'm trying to figure out if it's possible to style the items in a drop-down menu when I use the wxChoice widget. Best I can tell, it's not possible but I just wanted to ask the greater Perl community to make 100% sure that I was correct in my thinking.
My goal would be to color some of the items in the pull-down red, while others were black. I noticed that the wxChoice widget has the method SetForegroundColour, but this colors all the text in the wxChoice widget.
$driveCB->SetForegroundColour(wxRED);
Results in a pull-down looking like this:
Is it possible to individually style wxChoice items?
You can't do it with a wxChoice, but you could use a wxOwnerDrawnComboBox, there is an example of it in the wxWidgets samples, in the folder called combo.
The documentation says NO
This sounds like a pretty simple thing to do but I havent been able to find an easy way to do this. How do I create a panel with a title and a border which can contain my widgets? I have seen the SectionStack class which provides this. But I dont want to create a section stack.
Window can be added to a layout and drawn. But is it the only way or is there a container class that I am missing?
Also, how does one center things? Say a textfield and a button at the center of the page. How is this achieved?
If you are using a DynamicForm, you can give it a border and title with
form.setIsGroup(true);
form.setGroupTitle(title);
This actually works for Canvas, too (which is the superclass of most widgets and layouts in SmartGWT).
(I just had the same problem, and found this question, as well as the thread Is there a "titled Border" on the SmartGWT Forums, which gave this answer. I tried and it seems to work.)
To do form-related tasks, look into DynamicForm. To set the inputs in the form, you use setItems(Item...). A text field is a TextItem. You set it's title to control the label that SmartGWT will build. To get a title for the form, the best I've come up with is to use a container canvas that will contain both the title (probably a Label element) and the DynamicForm. To center the inputs, I believe you'd need to use setAlignment on the DynamicForm.
You could create an object that is actually a VLayout that contains a Label (the tile), has a border as you need and includes a Canvas (the generic stuff you want included).
In my experience, I noticed that very often I have a DynamicForm visible, so I just add a BlurbItem control to diplay the tile and a small explanation.