Form with style - atk4

I'm using version 4.1.4
Is it possible to create a form having some fields with a background color ?
something like the next image.
Thanks
Alejandro

I wanted to put an easy answer to this one. This works with 4.1 too.
$form->getElement('yourfield')
->js(true)
->closest('.atk-form-row-line')
->css(array('background'=>'red'));
Of course there are many ways and styling of the forms is described here:
http://agiletoolkit.org/doc/form/styling
http://agiletoolkit.org/codepad/gui/formstyle

Related

Insert an image inside a GtkLabel?

I would like to insert an image inside a GtkLabel but the <image> tag doesn't exists in Pango. I also tried to using the hacky way that consist of having a <span class="image"></span> and setting it a background-image via the CSS but class="" isn't a valid Pango attribute.
My question is: Is their a way to insert an image inside a label ? Not before or after but inside. Basically i would like to add emojis in my instant messenger messages.
I searched the web, and here but doesn't found a solution that fit my needs. :/
Thanks in advance for replies.
It seem that doing this isn't possible. The proper way to do it seems to be using a GtkTextView. For peoples that are running into the same issue of me, just run gtk3-demo → Text View → Multiple Views.
I posted some full code of Pango's handling of images here. Pango's image handling is very limited but might be able to handle your simple requirements.

CodenameOne - Dropdown List Design (FAQ Style)

Hi,
I am trying to achieve a similar screen to the one attached here using codename one. Its such that when a question is clicked, the answer drops down beneath it. The text would also have proper line breaks as it fills the screen width.
Is there any component I can use in achieving this using codename one?
I would suggest using the Tree component and setting the icons to null explicitly. This should work reasonably well for something like that and include the animation etc.

Tag editing in a WPF TextBox

I want to implement a custom TextBox that will allow me to edit tags. Hotmail's "To" TextBox is the best example I can think of:
Also Facebook's "To" implements the same concept:
Oh yeah, and StackOverflow does it too to tag a question :)
Does anyone have some experience in building something like that in WPF? What would be the first steps that I should make?
I believe this Tokenizing control does most of what you're looking for:
http://blog.pixelingene.com/2010/10/tokenizing-control-convert-text-to-tokens/
I'd try the following:
implement a TagEditor, which has the functionality to edit a single Tag (based on an AutoComplete TextBox that is swapped with a TextBlock once an existing Tag has been recognized or editing is ended)
create an DataTemplate that uses the TagEditor
create an ItemsControl that utilizes the DataTemplate
that breaks it down to three challenges, of which only the first is a bit tricky, but solveable with the given keywords and stackoverflow ;-)

ExtJS Create a component like editor of stackoverflow

I want to create a component on ExtJS like the editor that have stackoverflow for ask question (only Bold and Emphasis buttons). I think that should be an extension of textarea but i dont know how to select text selected and how to replace with tags+text. Please give me some ideas.
Thanks
Markdown by John Gruber can be obtained from his site. You could use his documentation as a basis for creating your own plugin for the HtmlEditor.
If you're talking about the ability to use asterisks for bullets and such, in that mode StackOverflow's editor uses something called "Markdown".
Here's one example of someone trying to make a markdown-based textarea with preview in Extjs:
http://www.sencha.com/learn/Extension:Ext.ux.MarkdownEditor
If you look around for other Markdown-related editors, you might find some ideas. If you're instead looking for just an "Online Rich-Text Editor" there's plenty of those.
UPDATE 29-APR-2014: There's actually a project you should take a look at. It's called "StackEdit":
https://stackedit.io
It's an open source initiative to supply a markdown editing component. Not ExtJS based, but those who find this question may be interested in what they are doing it.
(I discovered it through one of SO's open-source-recruiting sidebar campaigns; advertising can be useful, apparently.)

WinForms "mini-windows"

I need to create some mini-windows, like the ones shown in the image bellow, in my winform main form.
It would be nice if they could be draggable, resizable, and, mainly, closable.
How can I approach this design? Has anybody already seen some control (with code available) implementing something similar?
alt text http://img716.imageshack.us/img716/5765/imagea.png
A normal Form works fine for this. Set its FormBorderStyle to either FixedToolWindow or SizableToolWindow as desired.
If you want to keep your floating windows inside your main window, use MDI (Multiple Document Interface). Here is a tutorial (Google can find you many more).
Have you tried just setting the FormBorderStyle property to SizeableToolWindow?
Is that what you're after?
You can create them as resizable and draggable custom controls.
You could use my example at:
http://hourlyapps.blogspot.com/2008/07/resizable-and-movable-controls-c-net.html

Resources