vb6 set listview item/subitem image - image

I have a listview that I want to implement the effect seen in this image:
The listview hides some items like in the image below except a
password is entered. I know that item and subitem image are usually
left aligned.
How do I set the item and subitem image to cover the whole text are of the list view as shown?
EDIT
I got a tip of how to draw the pattern in this pics from here, but how do I draw this on a listitem?

You'll be better off using subclassing and owner/custom drawing. That will allow you to draw that entire row and let the listview deal with the rest.

Related

Famo.us images carousel

How can I create simple image carousel. Let's say I have GridView with two rows and one column. I want to create image carousel in upper row. Can I do that with ScrollView. Any sugestions?
You have the right idea. You can use gridLayout just to keep your sizing in line, and using scrollView is perfectly fine.
I do not know exactly how you imagine such a carousel working, but one option to be aware of in scrollview is the 'paginated' option. This allows you to easily define target positions for scrollview to stop and snap to, similar to a scroll picker on native. Or if you want the sources definition..
* #param {Boolean} [paginated=false] A paginated scrollview will scroll through items discretely
* rather than continously.
The next thing you may want to think about is how a carousel goes round and round and never reaches an end like scrollview would. There is no option for this by default, but I found a way it can easily be done. It may be a bit trickier with smaller images, but here is an example I did for a infinite panorama.
Transforming Panoramas for Virtual Tours with famo.us, has it been done?
The trick was to use a second duplicate image trailing the scrollview and when scrollview was in the right position, we could jump it back to the beginning, with no visual evidence to the user.
Here is the live example..
http://higherorderhuman.com/examples/infinite.html
Hope this helps you get started!

How to include canvas under panorama page in windows phone?

I have a panorama page with two panorama item and would like to include a canvas inside the second panorama item. So, when I do it, I get a overflow of the first panorama item in my canvas. As it should be made such that it takes around one and half page. So it should be like 2 and a half panorama page with two items a panorama item and a canvas item.
Make sure all the margin values are zero. Sometimes, Expression Blend will add margins to a child control to fit into the ItemTemplate of the panorama control. Remember a Canvas doesnt act like other components, it's contents are mapped to the pixel.
Also, if you are looking to make an item 1.5 page widths, consider changing the panorama item's orientation to horizontal.
Maybe put another canvas under the grid in your second panorama item?

How to know if the element is on the screen?

I have a horizontal ListBox with Images, which are pretty big and take 80% of the screen. User scrolls through this ListBox and images change quickly, and I'd like to highlight the image which is actually on the screen. What is the best way to do it?
Personally, I would use the class proposed by AnthonyWJones in this topic:
Restoring exact scroll position of a listbox in Windows Phone 7
The idea remains the same. You'll just change the vertical listbox to horizontal listbox.
Thus, you can recover the exact position of your listbox.

How to check the positions of different controls in iPhone

How to check some place is already reserved by some controls before adding a new control to the view.
I have added some buttons in the UIImageView and I want to display some images in a label which I'm getting in a random size from the server.I want to place those images over the empty places in the same view.
After adding the first image in some empty place,how could I know that this place is reserved and I have to place the second image in some other placeand the images and buttons should not overlap over each other.
Can somebody please help me ?
Try using CGRectIntersectsRect on the control's frame property (which it inherits from UIView).
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html
I don't believe this will work for rotated views though...hm.
See this image for reference: http://cl.ly/3T3d3w0D2I2Q1w1r0m46

Cocoa: Custom control not limited to window frame - how to start?

I want to build a custom control that would work like this:
You have a kind of NSButton with an image.
You click the button and than appears a big square with a grid of photos.
You click one of the photos and it is set up as new image for the button. (square dissapears)
Now, how to draw this big square with photos if I want it not to be limited to window frame?
I mean, if the button was close to window border the square is going to be partially outside window. I would also like to add some shadow to the square and an animation for opening/closing.
One important thing: I want to be able to draw not only a square but any other simple shape (circle)!
This isn't really a drawing question so much as a general custom views question. It's important to make that distinction.
I'll describe this in terms of rectangles to give you the general idea*. You should make sure you understand the view hierarchy and view geometry in Cocoa. Without this important requisite knowledge, you'll remain dead in the water.
It's easy to set an NSButton's image, so I'll leave that to you. Your button's action, however, would tell some controller to show the "image picker" for the given button. Your image picker would be some type of borderless window with an image list inside. The image picker could be an IKImageBrowserView (you'll have to enable Image Kit in Interface Builder for this control to appear), which gives you an iPhoto-like grid of images (with/without titles, different border types, etc.).
An explanation of the operation of this controller and how it creates the window, manages the selection, and sets the button's image is very broad so if you get hung up on any of those steps, you'll need to create a separate question for each problem, otherwise this answer would have to be an instruction manual for writing your app for you.
* Your problem is a little more difficult because of your desire to have differently-shaped "popup windows" ... you'd have to make sure your available photos fit neatly within the shape so none of them are cut off. Armed with the basic knowledge of view geometry, I'll leave this to you as an exercise. A hint: you can use a borderless, transparent window to host a view that draws itself in any shape you please.

Resources