RadGrid Specify ComboBox skin on edit? - telerik

I have a grid and a skin specified for that and it works fine. However, on the contained GridDropDownColumn columns, when it shifts to edit mode, the combo box is created nicely, but does NOT inherit the skin of the grid as the text boxes do. This results is a mixture of font sizes in the edit row (inline edit).
How can I tell the created ComboBox which skin to use?
Thanks!

I come upon similar glitch in one of my projects and what helped me to bypass it to set the EnableAjaxSkinRendering property of the RadComboBox editors to true on ItemCreated. Try that to see how it goes.
Dick

Related

Is there a way to add a ToolTip to an MDI Parent Form in VB6?

I'm currently working on a project that utilizes an MDI Form. What I would like to achieve is that when the user hovers over one of the menu options in the MDI menu, a ToolTipText appears describing what can be found in said menu. I'm aware of the fact that in some options for VisualBasic 6, ToolTip is supported. However, I can't seem to add this to the MDI Form, or add a label control for that matter. Has anyone ever run into this problem, and if so, is there a workaround or a solution?
Please let me know if you have any additional questions or comments. Thank you in advance.
I'm not aware that any true menus on a VB6 for (even non-MDI) have a tool-tip property; hence, neither does the MDIForm when one its child forms has its menu displayed.
However, there are a few controls that can be put on the MDI parent form. The most useful of these is probably the PictureBox, into which you can then place any type of control, such as CommandButtons. It must be "docked" to either the top or bottom of the MDIForm, using the PictureBox.Align property. Controls within the PictureBox can be located any way you wish, and can have their normal ToolTip properties set.
Another MIDForm-usable control that I've had good luck with is the ToolBar control, which comes in as part of the CommonControls component. Like the PictureBox, it has a .Align property to set it to the top or bottom of the MDIForm. You can put any reasonable number of "buttons" on it, and have reasonable control over their appearance (graphics, etc.); apropos the OP's query, you can assign a ToolTip to each button. It wouldn't be difficult to have the buttons change depending upon the currently-active form, just as the MDI menus normally do.
One other alternative that can be considered (but may be quite tedious to implement) could be reading the Mouse.X and Mouse.Y properties for each MDI menu and setting the captions of a Label control (or TextBox) using the Mouse Hover event.
You'd need to find the top left and bottom right points for each MDI menu and if it is within the box, you can show your label control with the intended caption. But note that you can't just put any controls on an MDI Form except maybe PictureBoxes, Toolbars and Coolbars, etc.
So the Label or TextBox control would have to be first placed on top of a PictureBox control which can be top aligned.

Adding Grids within Grids

I've just come across the new Grid layout system in Umbraco, which seems quite interesting, however I can't seem to find a way to include a grid within a grid.
I've added a simple 2 column row onto a page in the example below, but now I want to add another 2 column row within it to fill in the 2 red squares. Is this not possible or am I missing something obvious?
If I click any of the layouts at the bottom it instead adds them as an extra row to the bottom of the page rather than inside an existing grid.
The only way to include a grid in a grid (that I'm aware of) is to use the Doc Type Grid Editor package: https://our.umbraco.org/projects/backoffice-extensions/doc-type-grid-editor
This package allows any Document Type to be the basis for a grid editor. I was able to create a grid editor that was a set of tabs where each tab had a grid data type for the content. The data type was specific to tabs so you couldn't create tabs in a tab.
I also created a package (v7 Dialog Expander) to allow the dialog flyout to expand: https://our.umbraco.org/projects/backoffice-extensions/v7-dialog-expander. I did this because a grid in the small width of the dialog flyout was just too small.
It is definitely possible and actually has worked out well so far. That said, I would tread lightly here because there could be issues that we haven't yet discovered as this solution is still on a development project.

NSWindow and text smoothing in NSTableView cell view

I'm writing an OS X app and have a problem with font smoothing in separate window.
I have a text field where you put text and suggestion window which pops up with a list of suggestions according to what you wrote. I'm using View-cell based NSTableView to display those suggestions and SFBPopoverWindowController to display it as a "popup" window (tried other classes with the same effect). When rows are first drawn they look fine but after I select them (keyboard or mouse) the font changes it's weight. It's only visual - like you would change smoothing method on the font, not it's bold setting.
"Music note" is the selected cell here
What's even more strange is that after I hide and show the window 3 times everything works fine from that point on.
Again - "Music note" is the selected cell.
The selection is done by overwriting NSTableRowView class and its drawSelectionInRect: method but I tried with drawing everything inside custom NSTableCellView class and it didn't help. The text is standard NSTextField - nothing's changed there.
The SFBPopoverWindow (and it's controller) are created once and reused with styleMask NSBorderlessWindowMask, backing NSBackingStoreBuffered, defer set to YES. The only change in SFBPopoverWindowController I made was to turn off window becoming key window but it doesn't change anything.
It might be related to the way a table view draws it's selected cells (setSelectionHightLightStyle:). Try to set the style to None/ NSTableViewSelectionHighlightStyleNone in your code or IB / Storyboard-file and draw the selection yourself (in a NSTableRowView subclass).
Background: When you use NSTableViewSelectionHighlightStyleRegular or NSTableViewSelectionHighlightStyleSourceList the table view assumes that you use the standard selection behaviour and appearance and does some magic to support that.
==========
UPDATE
==========
My previous answer is still valid but since it only describes the problem and hints at a workaround, I wanted to add a real solution. If you want to use NSTableViewSelectionHighlightStyleRegular for your table view (with custom font and colors), you need a way to 'disable' the system magic that comes into place once your row is highlighted. One proposed solution is to decline the first responder status. It has a lot of drawbacks and isn't a good solution at all.
So, let's have a closer look at the system 'magic' that kicks in as soon as the row will be highlighted: NSTableRowView has a property interiorBackgroundStyle that is – according to the documentation – 'an indication of how the subviews should draw'. Furthermore 'This value is dynamically computed based on the set of properties set for the NSTableRowView. Subclassers can override this value when they draw differently based on the currently displayed properties. This method can also be called to determine what color a subview should use, or alternatively, NSControls can have the -backgroundStyle set on their cell to this value.'
I assume that this style will be handed down the subview hierarchy and causes your text fields to look odd. The system assumes that a highlighted cell has a dark background and changes the interiorBackgroundStyle to dark. Other controls try to adapt accordingly.
I think there are two solutions to this problem:
1) Override interiorBackgroundStyle in your NSTableRowView subclass and return the style that fits your interface (in my case it's .light because my highlight color is a very bright blue). This worked for me.
2) If changing the whole style is a bit too much because you only want certain elements to not change their style, you may only need to adjust these subclasses. I haven't tried this yet.

NSForm disappearing from custom sheet

I've made a custom sheet and it appears and disappears as necessary. However, the sheet includes an NSForm that disappears when automatic cell resizing is disabled.
When "Auto recalculate cell size" is enabled, the form appears but the form's cells are not sized properly.
Has anyone had this problem before?
The problem was with auto layout. I just disabled it for the sheet. Worked fine after that.

NSSegmented Control Not Selecting

I have an NSSegmentedControl with the textured rounded style, and with the selection mode set to 'any'. The problem is that it is treating it like select none. When I switch the style to capsule, it works correctly. I am using this in a toolbar, although I have tested this in a view (on two different computers) as well and it behaves the same way.
Thanks for the help
I've just realized this is a function of the rounded textured style. As of 10.5 (when I believe this was introduced), selection on this style of segmented control is indicated by a template image "glowing," not by a "pressed in" appearance.
There's an example showing a 3-segment control in the configuration you're asking about, each with NSLockLockedTemplate as its image. The "selected" states are, left to right, true, false, true.
So, not a bug, but a feature.

Resources