Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo ColumnWidth property not working.
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Combo ColumnWidth property not working.
Miscellaneous
Thread ID:
00366244
Message ID:
00366244
Views:
60
I have a combobox class I use for look-up tables. It has a .cTableName property and code in the requery event to populate a .aList property to hold to poulate the combo list. It works great except I can't control the ColumnWidths, they seem to have a mind of their own. Changing the property does seem to do anything.

I think it's locking the ColumnWidth to the width of the what's built by the SQL-select. Is there any way to control it?


Here is the Requery code:
** Queries the table in .cTableName to populate the combo
LOCAL cSQLstr, cName

WITH THIS
	IF EMPTY(.cTableName)
		RETURN .F.
	ENDIF

	cSQLstr = "SELECT cDesc, pk_id " + ;
		"FROM " + ALLTRIM(.cTableName) + " " + ;
		"ORDER BY cDesc"

	cName = .cTableName + "_" + SYS(UNIQUE_NAME)

	THISFORM.oCon.SQLSelect(cSQLstr, cName)

	IF RECCOUNT() > 0
		DIMENSION .alist[ RECCOUNT(), 2 ]
		COPY TO ARRAY .alist
	ELSE
		DIMENSION .alist[ 1, 2 ]
		.alist = ''
	ENDIF

	USE IN (cName)

ENDWITH
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Next
Reply
Map
View

Click here to load this message in the networking platform