Hutch
Sat Dec 04 23:33:32 CST 2004
Fred,
I added it via the form designer (graphically), the Visible property is set
to true, it is the default.
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
"Fred Taylor" <ftaylor@mvps.org!REMOVE> wrote in message
news:eXrbfxk2EHA.3408@tk2msftngp13.phx.gbl...
> How did you add your EditBox to the Grid? If you did it in code, you need
> to make sure the .Visible property is set to .T., even though you can
"see"
> it, it's not really there unless you do.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> news:IK6dndseHtU_dSzcRVn-gA@comcast.com...
> > Gregory,
> >
> > Thank you for the code, although I haven't tried it yet. But for some
> > reason I thought that once you set the CURRENTCONTROL to the editfield,
> > all
> > should be fine !!! I think this is way too much work (especially for us
> > beginners) to accomplish what should be straight forward.
> >
> > Thanks
> >
> > Hutch
> >
> > --
> >
> >
> > ---------------------------------------------------------------------
> > "Are you still wasting your time with spam?...
> > There is a solution!"
> >
> > Protected by GIANT Company's Spam Inspector
> > The most powerful anti-spam software available.
> >
http://mail.spaminspector.com
> >
> >
> > "Gregory Adam" <GregoryAdam@PleaseReplyViaNewsGroup.com> wrote in
message
> > news:uGutv9d2EHA.1408@TK2MSFTNGP10.phx.gbl...
> >> Hutch,
> >>
> >> This is the way I do it
> >>
> >> For Memos, the grid's column sparse is FALSE
> >>
> >> The EditBox class detects whether it is in a grid
> >>
> >> If it is, the in the init()
> >> this.BorderStyle = 0
> >> this.Margin = 0
> >> this.BackStyle = 0
> >>
> >> endif
> >>
> >> The keypress behaves differently if the editbox is in a grid and will
use
> >> the MODIFY MEMO command to either let the user edit the text or let the
> > user
> >> view the contents if it is readonly
> >>
> >> You can do something like this in the KeyPress if the Editbox is in a
> >> grid
> >>
> >> case between(nKeyCode, 0, 255)
> >>
> >> if( !empty(this.ControlSource) )
> >>
> >> push key
> >> on key label F7 keyboard '{CTRL+W}'
> >> on key label TAB keyboard '{CTRL+W}'
> >> local _form
> >> _form = iif(type('thisform') == T_OBJECT, thisform.Name, 'screen')
> >>
> >> if( this.ReadOnly )
> >> modify memo (this.ControlSource) NOEDIT NOMENU in (_form)
> >> else
> >> if( empty(this.Value) and !isblank(chr(nKeyCode)) )
> >> KeyBoard chr(nKeyCode) && user can start typing
> >> endif
> >> modify memo (this.ControlSource) NOMENU in (_form)
> >> endif
> >> pop key
> >>
> >>
> >> endif
> >> endcase
> >>
> >> hth,
> >>
> >> Gregory
> >> __________________________________________________________
> >>
> >> "Hutch Elassaad" <helassaad@comcast.net> wrote in message
> >> news:ELCdnUxDpuqFay3cRVn-jQ@comcast.com...
> >> > I am displaying a memo field in one of the columns of a grid (the
grid
> > is
> >> on
> >> > page 2 of a 2-page page frame), however, I am not using a textbox
> > object,
> >> > instead I am using an editbox object.
> >> > two weird behaviors:
> >> >
> >> > 1- If I click to edit the record, I can't type into the editbox to
add
> > or
> >> > change words. All the properties settings are correct, things like
> >> READONLY
> >> > is set to off, the column control is set to the editbox and not the
> >> textbox
> >> > and the control source for the editbox is a memo field in my table.
> >> > Although, I can select words and click into the editbox.
> >> >
> >> > 2- If the length of the memo is more than a certain number of
> >> > characters
> >> (I
> >> > think it is 256 or so), I get a message saying that the field is too
> > long
> >> > and the grid will not display (it disappears).
> >> >
> >> > Anyone has had that kind of behavior? And what is the best way to
fix
> > the
> >> > problem?
> >> >
> >> > Thanks
> >> >
> >> > Hutch
> >> >
> >> > --
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > "Are you still wasting your time with spam?...
> >> > There is a solution!"
> >> >
> >> > Protected by GIANT Company's Spam Inspector
> >> > The most powerful anti-spam software available.
> >> >
http://mail.spaminspector.com
> >> >
> >> >
> >> >
> >>
> >
> >
>
>