Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I've looked at this combobox too many times! It's blurry
Message
From
19/06/2002 14:21:49
 
 
To
19/06/2002 14:15:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00670240
Message ID:
00670242
Views:
19
Nevermind, as I said I had looked at it too long. I was changing the value of the controlsource later and that was changing the display value of course! Sheesh! You'd think it was Friday... :o)
Tracy

>I have a form array that is populated with afont. The array is used to populate a combobox. I want to position the combobox at "courier new" if courier new is found in the array. Following that, I display the font in a textbox. What is strange is that after running the code below, the textbox displays courier new font, but the listbox displays the first item in the list! Any ideas? I've looked at this too many times and I'm missing the obvious I'm sure....
>TIA,
>Tracy
>
>code to locate font in array:
>form.init()
>
>gnPos = ASCAN(thisform.gaFontArray, 'Courier New')
>*Note the result here is the correct value-it locates it fine
>IF gnPos != 0    && this code runs because it did find the value in the array
>    thisform.combo1.requery()
>    thisform.combo1.listindex=gnPos
>    thisform.text1.click()  && displays text in the courier new font in txtbox
>ENDIF
>
>
>Here is the strange part. As I said, the combo box actually displays the first item in the list, but the code below displays the text in the correct font of courier new!
>
>Textbox code that works as it should:
>thisform.text1.click()
>
>THIS.value="This is an example of the font "+ALLTRIM(thisform.combo1.value)+".  Size "+ALLTRIM(thisform.combo2.value)
>This.fontname=ALLTRIM(thisform.combo1.value)
>This.fontsize=VAL(ALLTRIM(thisform.combo2.value))
>thisform.refresh()
>DODEFAULT()
>
>
>What am I missing?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform