Qooxdoo: Set correct decoration to a Table - qooxdoo

I have a class that extend from qx.ui.tabview.Page. This class, of course, I instance and push it into a TabView. Well, this class has a __table member (an instance of qx.ui.table.Table).
On my Decoration theme class I override table and window and for both I set backgroundColor to "black".
When I run my app, the windows have the black background, but tables doesn't.
Some idea to get the override of table decoration work?

Cells in a table are divs, not table cells. Those divs have a background defined. You need to find the appearance theme for table cells, and override whatever holds the background color in the theme you are using. Table alone won't help.
For example, in .../qooxdoo-sdk/framework/source/class/qx/theme/classic/Appearance.js look for "cell". That's where the background color for normal table cells is being computed. It tells you which colors in Color.js you should set to black. But the location might be different in other themes.
Also, for alternate colors in table rows, probably the table implementation does some manual setting under the hood. Look into the framework code, into the table class, and see where "table-row-background-odd" is being used. (Hint: search for all occurences of bgcolOdd in qx.ui.table.rowrenderer.Default). You either set this color also to black in your Color.js, or override the default renderer - see qx.Class.patch() for how you can inject your code into framework classes.

Related

I want a control for Hotel room booking status to show in wpf

I am planing to show hotel room booking status as a color effect. See the image. At want control I want to use?
Dude, this is WPF... you could use just about any control that you want to do that. Ok so I'm exaggerating a bit, but it really is your choice. You should use whatever you're comfortable with. However, if I had to design a UI that looked like your image, I'd probably either go with a ListBox or a DataGrid with a fairly high level of customisation.
If I were to use a DataGrid, the day names could be the column headers and the room names could be the row headers. You'd also need to use some sort of custom ColorConverter class to colour the cell data in the cells.
Using a ListBox, I'd create a DataTemplate to apply to the ListBox.ItemTemplate property that would contain the whole row including the room name. Of course, this would mean that you'd need to structure your data differently to include the name of each room. With a known number of days/columns, you could just use a Grid in the DataTemplate with the Grid.IsSharedSizeScope property set to True to keep the columns of each item aligned.
Good luck and have fun with that... it seems like an interesting project.

Winforms PropertyGrid per-GridItem row height

I'm using the Winforms PropertyGrid; the target of the SelectedObject includes a property of type Image. Everything is fine, except that with all items the same height, the image is too small to see properly. I'd like to have some control over the height of grid items such that the image can be displayed a bit larger. One other detail is that the SelectedObject of one PropertyGrid control may be assigned an object of any of a variety of different classes (which may or may not have image properties), so I'm hoping the height can be driven by data in the instance of the SelectedObject itself, rather than making it a static behavior of the control, although I'd settle for a custom attribute of the image property to make the item height at least class-specific if it can't be instance-specific.
How can I do this? Custom attribute? PropertyGrid event? Something else?
As Simon commented on your question, this is not possible to have a custom height for a GridItem.
You have 2 solutions to be able to show an image with a reasonable size:
You can code your own UITypeEditor. That way, the user would just click the down arrow and see a nicely sized image in the dropdown box.
Sorry for the plug but I think it directly answers your question: only 3rd party PropertyGrids may allow you to get variable size rows in the grid. Smart PropertyGrid.Net is one of them. You set a HeightMultiplier to the row so that it expands on let's say 4 rows. Then you code your own Look class that handles the drawing of the image the way you want in this space.

Is there any ways to change color of label in RTC?

In the form, I would like to set the color of text in Label. Actually I can set it in Classic by using Label property called "FORECOLOR". but unfortunately in RTC doesn't change the color.
Are there any ways to do so in RTC ?
Thanks in Advance,
Makara
In the RTC the color options have been reduced. Essentially this is due to the change of "paradigm" in Forms vs Pages.
In Pages, controls have lost the ForeColor property, but gained the Style property. Essentially this changes the way NAV looks at data (knowing what the intention of the data is, rather than hard coding a color -- this allows new clients, such as the Web Client, to display it in it's own way if appropriate).
The style property can be set in the following ways (MSDN);
None (No colour)
Strong (Bold)
Attention (Red)
Favourable (Bold + Green)
Un-favourable (Bold + Italic + Red)
These 'styles' can be turned on and off using the Boolean StyleExpr property. This can be a variable to dynamically switch plain black, and the selected Style.
If you're using the transformation tool, the form property Forecolor is ignored and not translated to the Page's Style property. Properties in Forms and Pages are set independent of each other.
As for other colors, it's not possible out of the box. You could develop a Client Control add-in to create a custom control with colors however it seems a little bit of overkill. It'd have to be installed on all PC's that use NAV. I'd recommend just using the Style option :)

Set a DynamicResource reference to pick an individual element from a list in the resources

Basic Question
What I am trying (and failing) to do is pretty simple conceptually. I have an ArrayList of brushes as a resource, and I would like to bind an individual element's color to an element at a specific index in the ArrayList. If possible, I would like to get the index to bind to from the element's datacontext.
What it would look like is something like this:
<Line Stroke={DynamicResource DefaultGraphBrushes[0]}/>
I have tried a number of permutations of this (explicitly setting the ResourceKey, using quotes, '.', etc), and I am hardcoding the index for now to see if I can even do this. I would ideally like to get the index from the datacontext of the line.
Context
I am trying to do this because I have a graph control that takes in an arbitrary number of data sets and plots them on a grid. Some of the data sets have colors defined in the view model that they should always be shown in, some do not. For the ones that do I am simply binding to the color they provide and that works fine. For the ones that do not I need to pick a unique color from a predefined list of colors. The application has several different "themes" available, and the list of colors to use for the graph is different for each theme in order to make it readable and pretty. The brush the line is using needs to update when the user changes themes.
In the view model for each data set it knows whether it has an assigned color or not, and if it does not it picks the next index in the list of predefined colors to use to prevent multiple data sets from using the same color (unless we have more data sets than colors, which is unlikely).
I have been searching for a way to do this for quite a while. Any suggestions on how to make this approach work, or on other approaches that may work better are greatly appreciated. Thanks!
sometimes i don't understand why one should try too long to find a Xaml solution if this can be done much easier in code... Why not Bind your Stroke to a property that computes the Color ? code might access as well to resources (with TryfindResource or SetResourceReference). if you use tryfindresource, NotifyPropertyChanged if resource changed.

Customize the look of the Silverlight Control Toolkit drag / drop

Is there a way to override the template of or restyle the carrot (and even completely remove as I need in one case)? The carrot being the position marker where the drop will occur. I'd also like the ability to change the icons used during dragging - I've seen an infinity symbol, an arrow, and a strike-through circle, for which all I'd like to use custom icons. Unfortunately, I'm also confused as to when a given icon displays itself.
Just reviewing the docs it would appear that the DragDropTarget has a GetInsertionIndicatorGeometry which I suspect is responsible for the various symbols shown when dragging.
Hence for you to replace these symbols you will need to inherit the specific target type you are using and override this protected member to inject your own geometries.

Resources