Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Addobject in grid column at runtime : Readonly always .T
Message
From
12/11/2003 19:34:26
 
 
To
12/11/2003 18:24:23
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00848757
Message ID:
00849367
Views:
24
Hi, Dragan

>Nope, it's not invisible and visible. It's invisible. What you see is the default textbox that Fox conjures instead of the invisible one, because that's what it does if you don't supply your own control. Or if your control is invisible.

In fact it _is_ both invisible and visible. Believe me. I tried it. < s > It's not the textbox that's visible, it's the checkbox.
DELETE FILE ROCheckbox.SC? RECYCLE

* Make a form
CREATE FORM ROCheckbox NOWAIT
LOCAL laObject[1], lo
ASELOBJ(laObject,1)
lo = laObject[1]

* Add a grid with 1 column
lo.ADDOBJECT('grid1','grid')
lo.Grid1.COLUMNCOUNT = 1

* Make a simple cursor so the grid has something
* to bind to. Note, though, that this isn't 
* necessary to trigger the issue.
lo.WRITEMETHOD("Load",;
  "CREATE CURSOR temp (l1 l)" + CHR(13) + ;
  "APPEND BLANK")

* Add code to the Grid's Init() to add a
* checkbox at runtime and confirm it's invisible.
lo.Grid1.COLUMNS(1).WRITEMETHOD("Init",;
  "THIS.ADDOBJECT('check1','checkbox')" + ;
  CHR(13) + ;
  "THIS.CURRENTCONTROL = 'Check1'" + ;
  CHR(13) + ;
  "Messagebox('Check1.Visible='+" + ;
  "TRANSFORM(This.Check1.Visible))")

* Save and run the form.
KEYBOARD '{CTRL-W}'
DOEVENTS FORCE
DO FORM ROCheckbox
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform