PDA

View Full Version : Ext.touch.SegmentedButton



mitchellsimoens
11 Mar 2011, 8:28 AM
Idea was from this post:
http://www.sencha.com/forum/showthread.php?126515-Button-Groups

He wanted vertical SegmentedButton and you could do it with the existing SegmentedButton class but not as user friendly as I would like. You would have to specify the layout and do some CSS stuff but I have done that for you.

All you have to do is this:


{
xtype : "ext.touch.segmentedbutton",
direction : "vertical",
items : [
{ text : "Option 1" },
{ text : "Option 2", pressed : true },
{ text : "Option 3" }
]
}

GitHub: https://github.com/mitchellsimoens/Ext.touch.SegmentedButton
Demo: http://www.simoens.org/Sencha-Projects/demos/

http://www.simoens.org/Sencha-Projects/demos/screenshots/Ext.touch.SegmentedButton.png

davidyang
11 Mar 2011, 8:31 AM
Awesome - thanks for the quick response and help Mitchell!

grgur
11 Mar 2011, 8:50 AM
You are a very sweet person, thanks!

Steffen Hiller
11 Mar 2011, 9:07 AM
Hey grgur, that are my glasses you got there. lol

mitchellsimoens
11 Mar 2011, 9:07 AM
Hey grgur, that are my glasses you got there. lol

Think you have a fan!

Steffen Hiller
11 Mar 2011, 9:11 AM
Think you have a fan!

I will sign his glasses when I get a chance. :)

grgur
11 Mar 2011, 9:17 AM
I wish they were mine :) These I put on just to look dumb on a photo shoot. You should see my other photos from that session, wearing just the glasses. Wish you came to the conference, I'd show you the album :)

BTW, I love your glasses ;)

Steffen Hiller
11 Mar 2011, 10:16 AM
Haha. Well, I don't need to do photo shootings, the photographers follow me anyway, lol.

Happened last year in Barcelona, where I got my picture from. The only hi-res I got, though. :/

Yeah, shame it won't work out this year with the conf. :(

P.S. Basically my only set I've published on Flickr is Croatia 2005: http://www.flickr.com/photos/king_kamehameha/sets/72157594194331580/ :)



I wish they were mine :) These I put on just to look dumb on a photo shoot. You should see my other photos from that session, wearing just the glasses. Wish you came to the conference, I'd show you the album :)

BTW, I love your glasses ;)

colworx
14 Jul 2011, 2:04 PM
This is great! I wish there was an option to have the pressed state behave like a normal button, so you could do something like "sticky: false". I tried to add it myself but I'm having some trouble.

SegmentedButton was designed to be the child of a Toolbar, but with the vertical orientation that doesn't really make sense.

dobie_
22 Nov 2011, 1:20 PM
Hey, I'm trying to get this to work with Sencha Touch 2.0-pr2. Here's my changes so far: https://github.com/nikolas/Ext.touch.SegmentedButton/blob/patch-1/Ext.touch.SegmentedButton.js

I (https://github.com/nikolas/Ext.touch.SegmentedButton/blob/patch-1/Ext.touch.SegmentedButton.js)'m having trouble getting the buttons oriented vertically.

sevenshot
8 May 2012, 6:35 PM
I'm having a hard time getting this to work for S.T. 2.0 though ... @Mitchell, do you have an 2.0 working demo? Help please.

mitchellsimoens
9 May 2012, 5:13 AM
I'm having a hard time getting this to work for S.T. 2.0 though ... @Mitchell, do you have an 2.0 working demo? Help please.

It only works with ST1. I don't have any plans to get it working for ST2 currently.