Re: can u shed some light on this weird class instantiating err by rajani
rajani
Wed Jun 23 18:05:01 CDT 2004
yes,u r right.
i am wondering in which event i've to write that refresh command??
thanks
--
cheers
"Paul" wrote:
> "how can refresh textbox when the value in field changed without setting its
> control source "
>
> If I understand you correctly, if you want to display a new value from the
> database just use
> myControl.refresh
>
>
>
> "rajani" <rajani@discussions.microsoft.com> wrote in message
> news:DF3790DF-5EDA-40BB-9EFB-3F3EFF3A984F@microsoft.com...
> > Yes,paul u r 100% right.
> > i found out after debugging for a day!!
> > i am wondering how to handle this situation.
> > actually there is a command btn in this class when clicked this updates
> table the textbox bound to.
> > how can refresh textbox when the value in field changed without setting
> its control source
> > many thanks for ur expert ideas
> > --
> > cheers
> >
> >
> > "Paul" wrote:
> >
> > > Just a guess but it sounds to me like there is a controlSource on the
> > > textbox. When you add it to the form via the toolbar you are in design
> mode.
> > > Adding it by code would indicate you are at runtime, therefore the
> tables
> > > associated with the controlSource must be open prior to the textbox
> being
> > > added.
> > >
> > > "rajani" <rajani@discussions.microsoft.com> wrote in message
> > > news:5C6F9993-72F3-431B-928D-5496CAC45CEE@microsoft.com...
> > > > Hi friends
> > > > i created class (class name is ctrHeight.VCX) with container,a label
> > > ,commandbutton a textbox in it.
> > > > when i add this to this a form from toolbar everything works fine.
> > > > but when i add this control thr code like following
> > > >
> > > > thisform.AddObject('cnt','container')
> > > > thisform.cnt.visible=.t.
> > > >
> > > >
> > >
> thisform.cnt.newObject('cntheight','ctrlheight','D:\VSSLocal\vip\ctrHeight.V
> > > CX')
> > > > thisform.cnt.cntheight=.t.
> > > >
> > > > i am getting following error
> > > > "Error instantiating the object "txvalue" (actually it is a textbox)"
> > > > i am wondering what i am doing wrong here.
> > > >
> > > > i just found when i add this control from toolbar and add another
> control
> > > thr code
> > > > like abv everything working fine???
> > > > what i am missing here??
> > > > many thanks for ideas
> > > >
> > > > --
> > > > cheers
> > >
> > >
> > >
>
>
>