[flexcoders] Re: Border Thickness On ComboBox?

2010-09-01 Thread rfl.viana
Sorry to recover this old email.

I found this message in the Google, but when I used this skin the arrow wasn't 
showed.

Can someone can help me?


--- In flexcoders@yahoogroups.com, rueter007 rueter...@... wrote:

 This is a completely stripped down version.
 
 ---
 ComboTest.mxml
 ---
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute
 
   mx:Style
   .comboStyle
   {
   border-style: solid;
   border-thickness: 4;
   down-skin: ClassReference('ComboBoxSkin');
   over-skin: ClassReference('ComboBoxSkin');
   up-skin: ClassReference('ComboBoxSkin');
   }
   /mx:Style
   
   mx:ComboBox id=myCombo x=128 y=122 width=402 height=45
   styleName=comboStyle borderColor=0x00
   mx:dataProvider
   mx:Array
   mx:StringItem 1/mx:String
   mx:StringItem 2/mx:String
   mx:StringItem 3/mx:String
   mx:StringItem 4/mx:String
   /mx:Array
   /mx:dataProvider
   /mx:ComboBox
   
 /mx:Application
 
 --
 ComboBoxSkin.as
 -
 
 package
 {
   import flash.display.Graphics;
   import mx.skins.Border;
   
   public class ComboBoxSkin extends Border
   {   
 override public function get measuredWidth():Number
 {
 return 22;
 }

 override public function get measuredHeight():Number
 {
 return 22;
 }
   
   override protected function updateDisplayList(w:Number, 
 h:Number):void
   {
   super.updateDisplayList(w, h);
 
   var color:uint; 
   var borderColor:uint = getStyle(borderColor);
   
   var g:Graphics = graphics;
   g.clear();  
   
   // Draw the border and fill.
   switch (name)
   {
   case upSkin:
   case editableUpSkin:
   case overSkin:
   case editableOverSkin:
   case downSkin:
   case editableDownSkin:
   color = borderColor;
   break;  
   case disabledSkin:
   case editableDisabledSkin:
   {
   // border
   color = 0x99;
   break;
   }
   }
   
   // draw the border
   var borderThickness:int = getStyle(borderThickness);
   g.lineStyle(borderThickness, color);
   g.drawRect(0, 0, w, h);
   
   // draw the fill
   g.beginFill(0x00, 0);
   g.drawRect(0, 0, w, h); 
   g.endFill();
   
   g.moveTo(w - 22, 4);
   g.lineTo(w - 22, h - 8);
   }
   }
 }
 
 
 
 --- In flexcoders@yahoogroups.com, Ethan Miller flexcoders@ wrote:
 
  Can you provide a code sample of what you did inside ComboBoxSkin? 
 I see the various 
  routines in there, but didn't see the lineStyle which is where, I
 presume, you'd increase the 
  thickness??
  
  cheers, ethan
  
   Ok, I was wrong. Setting the borderStyle and borderThickness on the
   combo box does not do anything. Instead, I set a custom skin on the
   combobox and it works.
   
   border-style: solid;
   border-color: #00ff00;
   border-thickness: 5;
   down-skin: ClassReference('ComboBoxSkin');
   over-skin: ClassReference('ComboBoxSkin');
   up-skin: ClassReference('ComboBoxSkin');
   
   In the ComboBoxSkin, get the borderThickness and borderColor style
   properties and draw the borders for all the states.
   
   - venkat
   http://www.venkatj.com
   
   --- In flexcoders@yahoogroups.com, Sherif Abdou sherif626@ wrote:
   
If i had to guess i think it may have something to do with the
   scale9Grid but I am relatively new to flex
Flex examines the scale9Grid property to determine the value of the
   borderMetrics style.


- Original Message 
From: Ethan Miller flexcoders@
To: flexcoders@yahoogroups.com
Sent: Friday, January 18, 2008 6:56:35 PM
Subject: [flexcoders] Re: Border Thickness On ComboBox?

--- In flexcod

[flexcoders] Re: Border Thickness On ComboBox?

2008-01-22 Thread rueter007
This is a completely stripped down version.

---
ComboTest.mxml
---

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute

mx:Style
.comboStyle
{
border-style: solid;
border-thickness: 4;
down-skin: ClassReference('ComboBoxSkin');
over-skin: ClassReference('ComboBoxSkin');
up-skin: ClassReference('ComboBoxSkin');
}
/mx:Style

mx:ComboBox id=myCombo x=128 y=122 width=402 height=45
styleName=comboStyle borderColor=0x00
mx:dataProvider
mx:Array
mx:StringItem 1/mx:String
mx:StringItem 2/mx:String
mx:StringItem 3/mx:String
mx:StringItem 4/mx:String
/mx:Array
/mx:dataProvider
/mx:ComboBox

/mx:Application

--
ComboBoxSkin.as
-

package
{
import flash.display.Graphics;
import mx.skins.Border;

public class ComboBoxSkin extends Border
{   
override public function get measuredWidth():Number
{
return 22;
}
   
override public function get measuredHeight():Number
{
return 22;
}

override protected function updateDisplayList(w:Number, 
h:Number):void
{
super.updateDisplayList(w, h);

var color:uint; 
var borderColor:uint = getStyle(borderColor);

var g:Graphics = graphics;
g.clear();  

// Draw the border and fill.
switch (name)
{
case upSkin:
case editableUpSkin:
case overSkin:
case editableOverSkin:
case downSkin:
case editableDownSkin:
color = borderColor;
break;  
case disabledSkin:
case editableDisabledSkin:
{
// border
color = 0x99;
break;
}
}

// draw the border
var borderThickness:int = getStyle(borderThickness);
g.lineStyle(borderThickness, color);
g.drawRect(0, 0, w, h);

// draw the fill
g.beginFill(0x00, 0);
g.drawRect(0, 0, w, h); 
g.endFill();

g.moveTo(w - 22, 4);
g.lineTo(w - 22, h - 8);
}
}
}



--- In flexcoders@yahoogroups.com, Ethan Miller [EMAIL PROTECTED] wrote:

 Can you provide a code sample of what you did inside ComboBoxSkin? 
I see the various 
 routines in there, but didn't see the lineStyle which is where, I
presume, you'd increase the 
 thickness??
 
 cheers, ethan
 
  Ok, I was wrong. Setting the borderStyle and borderThickness on the
  combo box does not do anything. Instead, I set a custom skin on the
  combobox and it works.
  
  border-style: solid;
  border-color: #00ff00;
  border-thickness: 5;
  down-skin: ClassReference('ComboBoxSkin');
  over-skin: ClassReference('ComboBoxSkin');
  up-skin: ClassReference('ComboBoxSkin');
  
  In the ComboBoxSkin, get the borderThickness and borderColor style
  properties and draw the borders for all the states.
  
  - venkat
  http://www.venkatj.com
  
  --- In flexcoders@yahoogroups.com, Sherif Abdou sherif626@ wrote:
  
   If i had to guess i think it may have something to do with the
  scale9Grid but I am relatively new to flex
   Flex examines the scale9Grid property to determine the value of the
  borderMetrics style.
   
   
   - Original Message 
   From: Ethan Miller flexcoders@
   To: flexcoders@yahoogroups.com
   Sent: Friday, January 18, 2008 6:56:35 PM
   Subject: [flexcoders] Re: Border Thickness On ComboBox?
   
   --- In [EMAIL PROTECTED] ups.com, rueter007 rueter007@ ..
wrote:
   
set the borderStyle to be solid.
   
   Tried that 
   
   There's a note in the docs about borderThickness being overridden if
   dropDownStyle is set

[flexcoders] Re: Border Thickness On ComboBox?

2008-01-19 Thread rueter007
Ok, I was wrong. Setting the borderStyle and borderThickness on the
combo box does not do anything. Instead, I set a custom skin on the
combobox and it works.

border-style: solid;
border-color: #00ff00;
border-thickness: 5;
down-skin: ClassReference('ComboBoxSkin');
over-skin: ClassReference('ComboBoxSkin');
up-skin: ClassReference('ComboBoxSkin');

In the ComboBoxSkin, get the borderThickness and borderColor style
properties and draw the borders for all the states.

- venkat
http://www.venkatj.com

--- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote:

 If i had to guess i think it may have something to do with the
scale9Grid but I am relatively new to flex
 Flex examines the scale9Grid property to determine the value of the
borderMetrics style.
 
 
 - Original Message 
 From: Ethan Miller [EMAIL PROTECTED]
 To: flexcoders@yahoogroups.com
 Sent: Friday, January 18, 2008 6:56:35 PM
 Subject: [flexcoders] Re: Border Thickness On ComboBox?
 
 --- In [EMAIL PROTECTED] ups.com, rueter007 rueter007@ .. wrote:
 
  set the borderStyle to be solid.
 
 Tried that 
 
 There's a note in the docs about borderThickness being overridden if
 dropDownStyle is set... tried nulling that as well. Still no effect.
 
 ??
 
 ethan 
 
 
 
 
 
  

 Looking for last minute shopping deals?  
 Find them fast with Yahoo! Search. 
http://tools.search.yahoo.com/newsearch/category.php?category=shopping





[flexcoders] Re: Border Thickness On ComboBox?

2008-01-18 Thread Ethan Miller
--- In flexcoders@yahoogroups.com, rueter007 [EMAIL PROTECTED] wrote:

 set the borderStyle to be solid.


Tried that  

There's a note in the docs about borderThickness being overridden if
dropDownStyle is set... tried nulling that as well. Still no effect.

??

ethan 



[flexcoders] Re: Border Thickness On ComboBox?

2008-01-18 Thread rueter007
set the borderStyle to be solid.

--- In flexcoders@yahoogroups.com, Ethan Miller [EMAIL PROTECTED] wrote:

 Greetings!
 
 Here is hopefully a very simple question:  any way to increase the
border thickness on a 
 ComboBox? The property exists but setting it seems to have no
effect...  Believe it or not this 
 is a deal breaker on a current project so any quick help would be
much appreciated.
 
 cheers, ethan





Re: [flexcoders] Re: Border Thickness On ComboBox?

2008-01-18 Thread Sherif Abdou
If i had to guess i think it may have something to do with the scale9Grid but I 
am relatively new to flex
Flex examines the scale9Grid property to determine the value of the 
borderMetrics style.


- Original Message 
From: Ethan Miller [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, January 18, 2008 6:56:35 PM
Subject: [flexcoders] Re: Border Thickness On ComboBox?

--- In [EMAIL PROTECTED] ups.com, rueter007 [EMAIL PROTECTED] .. wrote:

 set the borderStyle to be solid.

Tried that 

There's a note in the docs about borderThickness being overridden if
dropDownStyle is set... tried nulling that as well. Still no effect.

??

ethan 





  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping