- changing form object properties with refresh method - beginner's question 
Author Message
 - changing form object properties with refresh method - beginner's question

Fellow Foxheads I need some help on this.

I created a form with textboxes displaying  table fields (defined in
the data environment of the form).

There are the usual buttons to navigate (Next Previous Top Bottom),
and also a button to search a textstring and a textbox to type in the
searchstring.

The code of the search button seeks the searchstring in the table and
refreshes the form (thisform.refresh)

I want to change the background color for some textboxes based on the
value of the fields in the table.

Example: the table is a inventory table, it has MIN and MAX fields and
more.
If the form is refreshed, and if the record has a MIN or a MAX field
that is greater than 0, I want to change the backcolor property for
the textbox displaying this field.

If I do this in the refresh method code of the form it does not change
for the currently displayed record, but when I skip to the next record
and skip back again only then does it change.

I hope the explanation is clear enough, I use Vfp 3.0.
Thanks.

Edwin



Fri, 28 Apr 2000 03:00:00 GMT  
 - changing form object properties with refresh method - beginner's question

Don't know about 3.0, but in 5.0 there is a Refresh method for a text box.
Try placing your code for setting the background color property in the
refresh method of the text box. This method should fire when your
thisform.refresh is executed.

--
Mike Welborn, Project Leader
LINK Staffing Services



Sat, 29 Apr 2000 03:00:00 GMT  
 - changing form object properties with refresh method - beginner's question

Try changing the color and then using
_SCREEN.Activeform.Refresh

Regards

Nick Steele



Quote:

>Fellow Foxheads I need some help on this.

>I created a form with textboxes displaying  table fields (defined in
>the data environment of the form).

>There are the usual buttons to navigate (Next Previous Top Bottom),
>and also a button to search a textstring and a textbox to type in the
>searchstring.

>The code of the search button seeks the searchstring in the table and
>refreshes the form (thisform.refresh)

>I want to change the background color for some textboxes based on the
>value of the fields in the table.

>Example: the table is a inventory table, it has MIN and MAX fields and
>more.
>If the form is refreshed, and if the record has a MIN or a MAX field
>that is greater than 0, I want to change the backcolor property for
>the textbox displaying this field.

>If I do this in the refresh method code of the form it does not change
>for the currently displayed record, but when I skip to the next record
>and skip back again only then does it change.

>I hope the explanation is clear enough, I use Vfp 3.0.
>Thanks.

>Edwin



Sat, 29 Apr 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. beginners question on refresh method

2. beginners question on refresh method ..

3. Class properties and inheritance - beginner's question

4. Changing one form's properties from a different form

5. ThisForm.refresh() - Change order of refresh of objects

6. A beginner's form question

7. Help: Form.Refresh() doesn't work for active form if mutiple forms on screen

8. Determine an objects properties and methods at runtime

9. Setting object properties with user-defined methods

10. Beginner question: What object do I use to open hyperlinked memo fields

11. How to programmatically change object event method ?

12. Calling a form's method from another form

 

 
Powered by phpBB® Forum Software