Re: Textbox alignment problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Stefan Wuebbe (stefan.wuebbe_at_gmx.de)
Date: 10/31/04


Date: Sun, 31 Oct 2004 23:44:47 +0100


"fb" <jhfcc@mail.jhptt.zj.cn> schrieb im Newsbeitrag
news:OeIpvsyvEHA.612@TK2MSFTNGP15.phx.gbl...
> Thank you very much, Stefan. Your example reminds me that I should
> write some codes myself, instead of using the grid from the form control
> toolbar.
> I used that toolbar in creating objects and designing a form. I dragged
> the grid onto my form, set the controlsources of the grid and its objects,
> and always found that the alignment is not what I want.
>
> I use VFP8 SP1.
>
> Chuncan Feng
> China

You're welcome.
>From your description, my guess would be the grid properties you had
set at designtime might have been reset at runtime, i.e. not cotain the
expected values anymore in the debugger or tested from the command
window?
If so, that effect could be caused by "grid reconstruction", which in turn
can be caused by assigning the grid.RecordSource property at runtime.
IOW, any line like
    Thisform.GridX.RecordSource = "myAlias" && makes grid collapse

One way to avoid that effect is to assign an empty string first
    Thisform.GridX.RecordSource = ""
    && reconstruct the recordsource
    Thisform.GridX.RecordSource = "myAlias" && restore previous

hth
-Stefan



Relevant Pages

  • Re: Reading/Writing XML Datasource...
    ... Access/SQL? ... For instace, using a grid or form control? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Reading/Writing XML Datasource...
    ... Access/SQL? ... For instace, using a grid or form control? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Reading/Writing XML Datasource...
    ... Access/SQL? ... For instace, using a grid or form control? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Electric Quilt 6? Worth it??
    ... but also snap to a grid? ... What about designing something like a mariner's compass, ... durrgh, of course they are in, or no, you need a blah blah blah to do that. ... have more than the capabilities that you're looking for. ...
    (rec.crafts.textiles.quilting)
  • Re: Adding a button to a datagrid
    ... Are you designing a control? ... I still think that including the textbox in the grid is not good idea, ... "Chris" wrote in message ...
    (microsoft.public.dotnet.languages.csharp)