How to set vertical scroll bar visible in ultraGrid cell when focus is not on the cell. I have set cellMultiLine property = True and VerticalScrollBar = True. But the scroll bar is visible only when focus is on the cell else it doesnot show the scroll bar.
That behavior is by design because it is pointless to show a scrollbar when it can't be used (all it would do is take up space that could be used to display data).
Hi Brian, I want to show 14 lines by default, but if it exceeds 14 lines then scroll bar should be visible without keeping focus on the cell. Because else user needs to do mouse click on each and every cell to check if there is content more than 14 lines. And we cant make the row height larger. Let me know if there is any solution on this.
Excellent. I like the XML much better. Good info that.
The Draw method ... okay.
Thanks, as always, IG team :)
Hi Mitch,
Mitchster2 said:Pardon my ignorance but the UltraFormattedTextEditor control creates 'rtf' data? Does it have also have a text property like the similar MS control which would return the unformatted text?
No, it's not rtf. We use a custom XML format similar to html. So you can do a lot of the same sorts of things you can do with RTF like use different fonts and colors. There's a Value property, which is the raw XML, and a Text property which returns the unformatted text. The cell's value would have to be xml in the grid, so if changing your data is not an option, then you could still do that by hiding the real data and creating an unbound column that contains the XML for formatting.
Mitchster2 said:Also, are there any good links for making a 'custom' control the EditorComponent? In particular, I was thinking a WebBrowser control but others may be useful at some point in the future.
The UltraControlContainerEditor allows you to embed any control you want in a cell as an editor. But this requires that the control support the Draw method, and I'm afraid that some controls that wrap Windows controls like the WebBrowser control and the RichTextBox control will not work because they don't support this method.
Hi Mike,
Pardon my ignorance but the UltraFormattedTextEditor control creates 'rtf' data? Does it have also have a text property like the similar MS control which would return the unformatted text?
I ask because I am keeping SQL code in a grid cell and would want to be assured that I could get it back out... as is.
Also, are there any good links for making a 'custom' control the EditorComponent? In particular, I was thinking a WebBrowser control but others may be useful at some point in the future.
Thanks in advance.
Mitch Bird
The user doesn't neccessarily have to click on the cell and scroll. Simply hovering the mouse over the cell will show a tooltip with the entire text.
Another option you could consider is using an UltraFormattedTextEditor. So you would place an UltraFormattedTextEditor on the form and set it's ScrollBarDisplayStyle to Always. Then set the column's EditorComponent to the UltraFormattedTextEditor control. This will display scrollbars in the cell at all times. But it also means that the user can format the text. For example, they could select some text in this cell and pres CTRL+B to make it bold or CTRL+I for underline, etc.