How would I indent the detail grid of a row using Telerik UI ASP.NET MVC? The examples given are very basic. I'm beginning to doubt if it is even possible
In the attached image I'd like for the edge at the red arrow to be indented to match the red line.
You can add a style rule like:
.k-detail-row > .k-detail-cell {
padding-left: 450px; /* This gets it to about where the red line is in the screen shot. */
}
and set the value to whatever you find appropriate.
http://dojo.telerik.com/#Stephen/EsEDo
Related
I have chosen the 'full width' template for mail chimp and I cannot for the life of me change the background colour of each row.
It allows a full width strip of colour for the header, but not for the blocks that follow. I can put inline styles or embedded css in there, but I do not know how to target each row.
I have been sent emails that feature this but I cannot achieve this. Any help would be great.
It seems that background colour can be changed for "boxed text" content sections, but not in other content sections. Even within boxed text, padding is automatically added, so the background colour won't cover the full width (unless you edit the source code.)
If you want all the rows to have the same background, you can change it by clicking on "design" at the top of the right hand menu. Within that section you can set a background for each page section (header, body, footer.)
If you want the rows/content sections within each page section to different colours you'll need to edit the source code directly.
You can do this from within mail chimp by clicking edit for the section you want to change the background for, and then clicking on the source <> icon. If you want to edit it outside of mail chimp, you can export the html by going to your "templates", and on the right hand side there will be an "edit" and a dropdown arrow button. You can export the html by clicking the dropdown.
To edit the html directly, add the style inline.
style="background-color: [color]; padding: 0;"
Okay - I've read John Albin Wilkins http://palantir.net/blog/responsive-design-s-dirty-little-secret - and I now understand the motivation for the 'isolation' mode (and how it's implemented).
I then read Sam's initial rebuttal of isolation mode, although he's updated his post to say that he's coming 'round to the idea (or that at least he understands the motivation for it) - http://snugug.com/musings/on-responsive-designs-dirty-little-secret
If I've understood all of this correctly, one enhancement that Singularity offers over Zen grids, is that it allows you to mix output styles (for example you could switch to float output in the middle of a layout using the #import layout mixin).
However, in isolation mode - I'm still not clear on how you 'clear a row' - as John Albin Wilkins mentions in his post...
While floated items with this technique can no longer see each other’s right edge, they can still see their bottom edges when clearing. And it means you can start a new row of grid items by simply clearing the previous grid items and this new row will be positioned below all the previous content.
Let's say I have a section and inside that I have 6 articles - and I want all of the articles to occupy 1 column of a two column grid in the section.
grid-span(1,1)
grid-span(1,2)
/* next row */
grid-span(1,1)
grid-span(1,2)
/* next row */
grid-span(1,1)
grid-span(1,2)
Maybe I'm obsessing a little with row clearing, although I confess that with this occurring 'naturally' in a float output, and with Sam latching on to it in his post, and with neither post describing exactly 'how' you clear the row in isolation mode without using a clearfix container, my curiosity is piqued.
To clear a row, use clear: both on the first item of the row.
Note that Singularity isolation span mixin applies clear: right, so you have to apply your clear: both after the span mixin:
.foo
+grid-span(1, 1)
.bar
+grid-span(1, 2)
.baz
+grid-span(1, 1)
clear: both
.quux
+grid-span(1, 2)
For more background info on clearing, read this answer: Layout using Singularity
I need to reduce the width of the following buttons (drop-downs):
"Formatting Styles"
"Paragraph Format"
"Font Name"
"Font Size"
How can I do it?
You can modify the CSS of the underlying button element.
If you want to target specific tools, just use firebug to dig into the DOM and see what their particular classes are.
For example, to modify the widths of the format and font drop downs, use the following CSS:
.cke_skin_kama .cke_format .cke_text,
.cke_skin_kama .cke_font .cke_text {
width: 72px;
}
In CKEditor 4, you can adjust .cke_combo_text like this:
span.cke_combo_text {
width: 30px;
}
Note that if you make it smaller than the default (60px for Formatting Styles), then when the user selects an option from the dropdown, the selected option will no longer fit inside the updated dropdown box.
In my case, I was looking to clean up the UI so that it all fits into one line neatly on an iPhone in vertical orientation, so I did this:
span.cke_combo_text {
width: inherit;
}
For my case, this was great because it shrinks the dropdown menu so that it fits on one line by default, but automatically expands (taking up a new line) if an option is selected, showing the user what they chose.
I have a Validator attached to a field. When validation fails, I want the red line to appear in the field, but I do not want the red icon to appear to the right of the field. How can I accomplish this? I don't see this functionality in the documentation. Thanks!
I also posted this on Sencha's forums but they are very slow: http://www.sencha.com/forum/showthread.php?175577-How-can-I-disable-the-TextField-validation-icon&p=718440#post718440
I got the answer from the Sencha forums.
Check out Field.setMessageTarget(String) - you'll want to pass in
"tooltip" (or, to just not draw that icon, anything but "side"). With
that set, it shouldn't even attempt to draw the icon.
http://www.sencha.com/forum/showthread.php?175577-How-can-I-disable-the-TextField-validation-icon&p=718440
What about converting the field in a DOM element, then navigate till the Red icon and apply a style to disable it?
Something like:
((El)passwordField.getElement().getParentElement().getChildNodes().getItem(2)).setStyleAttribute("display", "none");
You could have a CSS style like this :
.x-form-element img {
display: none;
}
or
.x-form-item img {
display: none;
}
All the images in a form element won't be displayed.
dateField.forceInvalid("error message which u want to pass"),.it will automaticaly show an exclamation mark on the right side of the date field
When using custom-draw (NM_CUSTOMDRAW) to draw the entire contents of a ListView SubItem (in Report/Details view), it would be nice to be able to apply the same left and right
padding in my custom paint method that is applied by the control itself for non-custom-drawn items.
Is there a way to programmatically retrieve this padding value? Is it
related to the width of a particular character (" " or "w" or something?) or
is it a fixed value (6px on left and 3px on right or something) or...?
EDIT: To clarify, I want to add the same padding to my NM_CUSTOMDRAWn SubItems that the control adds to items that it draws, and the metric that I'm looking for, for example, is the white space between the beginning of the 2nd column and the word "Siamese" in the following screenshot (Note: screenshot from MSDN added to help explain my question):
(source: microsoft.com)
Note that the word "Siamese" is aligned with the header item ("Breed"). I would like to be able to guarantee the same alignment for custom-drawn items.
use ListView Header message HDM_GETBITMAPMARGIN
see link text
ListView_GetSubItemRect (LVM_GETSUBITEMTECT)
http://msdn.microsoft.com/en-us/library/ms930172.aspx
Despite what the documentation says I suspect LVIR_LABEL returns just the returns the bounding rectangle of the item text, as per ListView_GetItemRect.
(This just kept niggling me as I though I had actually seen an answer somewhere when playing with NM_CUSTOMDRAW).
Edit After Comment 2:
I imagine you have seen NMLVCUSTOMDRAW which if you are willing to use Version 6.0. has rcText. I wouldn't since I use Win2K.
Given what you have found I would go back to the suggestion of using
ListView_GetItemRect to get LVIR_LABEL and compare that with LVIR_BOUNDS and use the difference.
the way for doing this is retrieving the format of the corresponding column with
ListView_GetColumn()
then check the retrieved myLVCOLUMN.mask
LVCOLUMN myLVCOLUMN;
myLVCOLUMN.mask=LVCF_FMT;
ListView_GetColumn(hwnd,nCol,&myLVCOLUMN);
then when we draw the corresponding label belonging to that column
if(myLVCOLUMN.fmt & LVCFMT_CENTER)
DrawText(x,x,x,x, DT_CENTER | DT_WORD_ELLIPSIS );
else if (myLVCOLUMN.fmt & LVCFMT_RIGHT)
DrawText(x,x,x,x, DT_RIGHT | DT_WORD_ELLIPSIS );
else
DrawText(x,x,x,x, DT_LEFT | DT_WORD_ELLIPSIS );
I would assume that GetSystemMetrics() is that you need to look at. I think that SM_CXEDGE and SM_CYEDGE are probably the values you want, but don't quote me on that. ;-)
Can only guess without seeing your output.
A few suggestions: If you are using the DrawTextEx function, have you have experimented with DT_INTERNAL et al?
Are you accidentally putting in a blank image/icon.
Does it look ok in classic screen mode? If so I would look at XP Theme functions to see if some thing is going on.
Late edit after first comment:
I wonder if the size of rectangle matches the space required for the LVN_ENDLABELEDIT edit box around the text so the text doesn't move (or for a focus rectangle)?
I guess you could compare the result of LVM_GETITEMRECT with LVIR_LABEL on the first column and use the difference as your left border.