Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Addobject in grid column at runtime : Readonly always .T
Message
De
12/11/2003 19:34:26
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
12/11/2003 18:24:23
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00848757
Message ID:
00849367
Vues:
25
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform