Can images be block-hilighted? (like text) - image

I'm trying to adapt ckeditor, where the content is not text, but images only, where each image displays a character in the alphabet. (By creating an image from an off-screen canvas object)
Only problem is that users can't do block selections by dragging over them (like you would with text). Is this even possible in the contentEditble world? I was hoping that setting the draggable attribute to false for each tag would do it - but no dice :-(
Any ideas would be greatly appreciated.
Thanks!

Yes:
I've copied the image in the demo and then I'm able to drag select all of them.
I guess that it might be harder to control the selection like you do with text.

I got this to work now. Just had to listen for mouse & key events and handle the selection manually.

Related

How to prevent overflow text in a text block?

I'm trying to make an ebook reader. I want each page to scroll sideways (like the Pivot viewer does) but I can't get out how to figure out how many words need to be added to the text box on a screen to before it starts overflowing (I don't want the user to scroll vertically).
Any tips?
Thanks!
There is a Scrollable TextBlock which divide text into blocks of 2048px height. You can use their code to get text that will exactly fit into one page (800px, for example)
Creating Scrollable TextBlock for WP7
If you call the UIElement.Measure(Size) method, then check the UIElement.DesiredSize property, it will tell you the size of an element before it is rendered. You could add text, repeatedly measuring the rendered size.
However ... this will be pretty inefficient. It is much better if you can create a layout that performs what you require automatically.

Grow Images on Hover like Google Images

Hey everyone, I am trying to accomplish something with images growing on hover like the fancy grow mouseover effect on google images.
Here is what I have:
http://www.1stbusinessneeds.com/tooltip/tooltip.html
The tooltip is offset and is based on the walter zorn tooltip. What's the best way to have the mouseover popup grow out just like google images (with the text), instead of following the mouse?
(I still need it done with the same tooltip - maybe overwrite it, but it must be present to pass the text and image, it's just the positioning and display method of it that I need help creating, any samples would be appreciated)
You might want to look at JQuery.
this might be a good start http://jsfiddle.net/ZwhEu/

Displaying an image when hovering a label

I'm wondering if there is a simple and quick way of displaying an image when the user hovers a QLabel...
Since QLabel can be used to display QPixmap, I would like to display some kind of "preview" when hovering a QLabel...
Do you guys know how I could manage this ?
Thanks in advance !
You can set the tooltip to use html, including <img> tags. Will that do what you need?
As described in the docs, you can override the object's event handler if you need to do something fancier in a tooltip than can be done by default. (such as selecting a particular area of an image to put in the tooltip)
As long as you set the button size large enough, you should be able to capture the mouse-over events and display on mouse-over... but this seems like a somewhat strange way to go about things. Why not display all the images at first?
For those who are interested in the result proposed by jkerian :
Simply :
MyLabel->setToolTip("<html><img src="+MyImagePathAsString+"/></html>");
Will result in :
Thanks again to jkerian.
I don't know what kind of layout your QLabel is in, but I'm guessing it will cause weird layout changes if you just set the pixmap on the label when mouseovering it. Rather use a tooltip or just display a pixmap freely on the canvas.

disable text selection in gwt

i am pretty new to GWT,
i have an image that i have placed a text on top, i need the text to look as part of the image.
i have used the image widget and the HTML widget to position it on top of it, i need this text to change according the locale.
the problem that the text is selectable, so it does not look right.
1) is there any way to make the text un-selectable?
2) is there a better way to achieve that?
thanks
This is handled by the user-select attribute.
See: http://www.tek-tips.com/viewthread.cfm?qid=1184318&page=1

Non-traditional input using CSS sprites and JavaScript: opinions sought

My client is very invested in using a bunch of non-traditional inputs in a form we are developing for him. The image below represents various states of the interface with the last indicated it is disabled in the current context. The end users will be trained in how to interact with the inputs.
alt text http://www.nolaflash.com/interface.gif
My idea is that we will develop an image map representing the clickable zones of the image and let the onclick event set a hidden field and change the CSS for the element to move the background sprite to the appropriate coordinates.
What do folks think of this? Obvious flaws other than folks with JavaScript disabled?
I want the end solution to be iPhone/other device friendly.
Your thoughts will be appreciated.
let the onclick event set a hidden field and
change the CSS for the element to move
the background sprite
sounds reasonable
Here is my solution using CSS Sprites and JS
http://egolfplan.com/testform.html

Resources