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

Re: Memo field in a grid by Paul

Paul
Fri Dec 03 18:05:23 CST 2004

Memos are often too big to edit in a grid anyway.

Try using a textbox that contains the first several characters of the memo,
and make it so that double-clicking the text box will open an editing
window.



"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
>
>
>



Re: Memo field in a grid by Hutch

Hutch
Fri Dec 03 20:57:31 CST 2004

Paul,

I am aware of that and had it working that way. My question is why I can't
edit the memo field and what is the size limit? By trying to accomplish what
I want, I can put a slider bar to control the rowheight of the grid rows
allowing the user to see more of the memo field instead of the limited
number of characters.

Thank you,

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


"Paul Pedersen" <no-reply@swen.com> wrote in message
news:eQOk1TZ2EHA.304@TK2MSFTNGP11.phx.gbl...
> Memos are often too big to edit in a grid anyway.
>
> Try using a textbox that contains the first several characters of the
memo,
> and make it so that double-clicking the text box will open an editing
> window.
>
>
>
> "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
> >
> >
> >
>
>



Re: Memo field in a grid by Gregory

Gregory
Sat Dec 04 02:55:25 CST 2004

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
>
>
>


Re: Memo field in a grid by Hutch

Hutch
Sat Dec 04 10:41:06 CST 2004

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
> >
> >
> >
>



Re: Memo field in a grid by Fred

Fred
Sat Dec 04 15:58:22 CST 2004

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
>> >
>> >
>> >
>>
>
>



Re: Memo field in a grid by Hutch

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
> >> >
> >> >
> >> >
> >>
> >
> >
>
>



Re: Memo field in a grid by Gregory

Gregory
Sun Dec 05 05:25:33 CST 2004

Hutch,

Put all of it in your own _EditBox class. It may be too much work, but then
you do it only once.

I've stopped using the grid builder/designer since long

I just put a grid on the form and fill in the RecordSource. The init() of
the grid takes care of every column of the grid. If I find a memo field, I
drop the current control and add my own _EditBox. (same for Logical,
TextBox, Currency, headers, ..) Like I said, only to be coded once


Good luck,

Gregory
______________________________________________________

"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
> > >
> > >
> > >
> >
>
>