Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color of ComboBox border
Message
From
02/07/2006 06:54:40
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01133168
Message ID:
01133310
Views:
13
>Hello,
>
>Is it possible to set combobox border colour?

no

>If I'm setting combo.bordercolour, then colour of dropdown list border is changing, but not combobox itself... :-/

this is a design's bug, the name have to be "ListBorderColor".

>
>Giedrius


you can play with this
IF VERSION(5) < 800
	MESSAGEBOX("upgrade your VFP")
	RETURN
ENDIF

WITH CREATEOBJECT("Formtest")
	store .addobject("combo","ComboBoxEx") TO .combo.visible
	.combo.move(20,20)
	.Show

ENDWITH 

DEFINE CLASS Formtest AS Form
	
	PROCEDURE Init
		ADDPROPERTY(this,"live",this)
		this.addobject("TM","timer")
		=BINDEVENT(this.tm,"timer",this,"updatecolor")
		this.tm.interval = 1000
		
	PROCEDURE updatecolor
	
		this.combo.TrueBorderColor = BITAND(BITLSHIFT(this.combo.TrueBorderColor,8),0xFFFFFF);
						+BITRSHIFT(this.combo.TrueBorderColor,16)

ENDDEFINE

DEFINE CLASS ComboBoxEx AS ComboBox
	BorderColor	= 0x00ff00
	
	TrueBorderColor = 255

	RowSource	= "a1,b23,c45"
	RowSourceTYPE	= 1
	
	HIDDEN PROCEDURE TrueBorderColor_Assign(tbc)
		this.TrueBorderColor = m.tbc
		this.Themes_Access

	HIDDEN PROCEDURE Themes_Access
		thisform.ForeColor = m.this.TrueBorderColor
		thisform.Box(OBJTOCLIENT(m.this,2),OBJTOCLIENT(m.this,1);
                            ,OBJTOCLIENT(m.this,1)+OBJTOCLIENT(m.this,3),OBJTOCLIENT(m.this,2)+OBJTOCLIENT(m.this,4))
		RETURN m.this.Themes
		
ENDDEFINE
or uses OS's Api
Previous
Reply
Map
View

Click here to load this message in the networking platform