I guess CPCollectionView may be a good candidate for this. So, now I have messages displayed in one column one after another.
Nevertheless the collection view may change it's width as window can be resized by user. Is there any way to make CPCollectionViewItem, displayed inside the CPCollectionView, to adjust dynamically its width?
Example is below.
Before resize: http://twitpic.com/wp1jx
After resize: http://twitpic.com/wp1qe
As you see CollectionView did change but Item inside still has the same width.
cheers,
Justin
It might be helpful for you to look at the excellent Flickr Photo
Demo, which implements dynamic resizing behavior of a
CPCollectionView.
http://cappuccino.org/learn/demos/
Sincerely,
Joel
cheers,
Justin
-Ross
> --
>
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to objectivej+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/objectivej?hl=en.
>
>
Sincerely, Samvel.
Sincerely, Samvel.
-Ross
Sincerely, Samvel.
Once slider gets new value some operation is called that resizes CollectionViewItems by setting new Min and Max size. Resize is done manually.
In overall, in my application (displaying a simple list inside the window of some text messages) I could track myself any superview resize action (say, with delegate) and adjust size of CollectionView by calling setMinItemSize and setMaxItemSize in exactly the same way it is done in Flickr demo above.
Although, I do not think this is the way it should be done. I home Cappuccino adjusts Height and Width automatically if I ask it to do so. Resize should be done once I apply Autoresizing Mask to Items in the same way as it is done for say CPTextField or any other Subclass of CPView.
Unfortunately it does not seem to work the same way for CollectionView Items.
Basically, it seems that word-wrapping is accomplished through CSS
rather than resizing the CPTextField to accommodate the new lines.
Because of this, there doesn't seem to be any way for my newly
enlarged CPTextField to tell it's containing CPCollectionView (or
CPOutlineView) that it's height is... whatever it's reflowed, word-
wrapped height is.
Any thoughts? Am I going down the wrong road?
-Thomas
On Jan 4, 6:08 pm, samdev <ksam...@gmail.com> wrote:
> Ok, I reviewed the Flickr demo code once again. Here is what happens:
>
> Once slider gets new value some operation is called that resizes CollectionViewItems by setting new Min and Max size. Resize is done manually.
>
> In overall, in my application (displaying a simple list inside the window of some text messages) I could track myself any superview resize action (say, with delegate) and adjust size of CollectionView by calling setMinItemSize and setMaxItemSize in exactly the same way it is done in Flickr demo above.
>
> Although, I do not think this is the way it should be done. I home Cappuccino adjusts Height and Width automatically if I ask it to do so. Resize should be done once I apply Autoresizing Mask to Items in the same way as it is done for say CPTextField or any other Subclass of CPView.
>
> Unfortunately it does not seem to work the same way for CollectionView Items.
>
> On Jan 4, 2010, at 7:47 PM, Ross Boucher wrote:
>
> > Well, bad style aside (and I don't think it really is), that's not the only way to use these properties to your advantage. Once again, the Flickr tutorial shows how you might accomplish updating them dynamically.
>
> > -Ross
>
> > On Jan 4, 2010, at 8:44 PM, KSamdev wrote:
>
> >> It does not solve my issue. I do not want to set min size to, say,
> >> (10,10) and max to (10000,10000). It is bad style.
>
> >> Sincerely, Samvel.
>
> >>> For more options, visit this group athttp://groups.google.com/group/objectivej?hl=en
> >>> .
>
> >> --
>
> >> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> >> To post to this group, send email to objec...@googlegroups.com.
> >> To unsubscribe from this group, send email to objectivej+...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/objectivej?hl=en.
cheers,
Justin