Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox in grid dynamically change the caption
Message
 
 
To
25/05/2023 12:55:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01686606
Message ID:
01686617
Views:
24
>>Since my grid is data driven (built based on a DBF), I have a tough time relating your code to my case.
>>I have a question.
>>
>>This is the top of the code where the grid is built:
>>
>>	nColumn = nColumn + 1
>>	with toGrid.columns(nColumn)
>>
>>
>>How can I apply your property .DynamicBackColor to the code above (if it is possible). I tried many different ways but I get an error.
>>
>>Thank you.
>
>
>This should be enough
>
>with toGrid.columns(nColumn)
>        .DynamicBackColor = ....
>...
>ENDWITH
>
>
>
>BUT
>If you want to set this property for EVERY column in the grid:
>
>toGrid.SetAll("DynamicBackColor", "....", "Column") && Check this method in HELP
>
Thank you!

One more question, please.

Your code has the function
    PROCEDURE setcaption
        thisform.Grid1.ColUMN1.Check1.Caption = ALLTRIM(Test.Fld2)
        RETURN thisform.Grid1.ColUMN1.BackColor
    ENDPROC
I use the code
.DynamicBackColor =  "SetCaption()"
How do I change the function SetCaption() to accommodate your line:
thisform.Grid1.ColUMN1.Check1.Caption = ALLTRIM(Test.Fld2)
That is, in my code, the function SetCaption does not "know" what is the Column number. I need to pass the value from the SetCaption above, but I don't know how.

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform