Tab Controls/tab pages/controls within tab pages

I give up! I have a tab control user object - inherited from u_tab - and
some tab pages. Initially only one page is enabled which has a
datawindow. When a valid data is entered in the DW, I need to enable
rest of the tabs - Now - it is giving me a NULL object reference error
during execution for the following statement in an event of the DW -
tabcontrol.tabpage.enabled=TRUE
getparent( ) also giving errors - HELP! How can I do this?
Thanks!
Ragni
rpanjala@nsf.gov

0
Ragni
4/29/1999 7:54:07 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

4 Replies
1702 Views

Similar Articles

[PageSpeed] 46

Ragni --

If you have CreateOnDemand set for the tab, then the tab pages are not valid
until the user accesses them.  So, before you reference the tab page, make
sure it has been created by calling IsValid.

HTH

Ron Gallagher, CPDP
Atlanta, GA
rongallagher@mindspring.com


Ragni wrote in message <3728B8DF.25D6219F@nsf.gov>...
>I give up! I have a tab control user object - inherited from u_tab - and
>some tab pages. Initially only one page is enabled which has a
>datawindow. When a valid data is entered in the DW, I need to enable
>rest of the tabs - Now - it is giving me a NULL object reference error
>during execution for the following statement in an event of the DW -
>tabcontrol.tabpage.enabled=TRUE
>getparent( ) also giving errors - HELP! How can I do this?
>Thanks!
>Ragni
>rpanjala@nsf.gov
>


0
Ron
4/29/1999 8:47:24 PM
Nope - I do not have it on create on demand - anyway I got it working now -
someone suggested a approach - create a tab type variable, using getparent() and
parent functions, assign the tab control to this variable
Ex:
in script of the control on a tab page,
tab temptab
tabtemp=parent.getparent()

and then using control[] property acess the pages.

tabtemp.control[1].enabled=TRUE

again here   tabtemp.tabpage_2.enabled=TRUE type of expression would give a
error.
 I wonder if it is a bug in PB!
Thanks anyway..

Ron Gallagher wrote:

> Ragni --
>
> If you have CreateOnDemand set for the tab, then the tab pages are not valid
> until the user accesses them.  So, before you reference the tab page, make
> sure it has been created by calling IsValid.
>
> HTH
>
> Ron Gallagher, CPDP
> Atlanta, GA
> rongallagher@mindspring.com
>
> Ragni wrote in message <3728B8DF.25D6219F@nsf.gov>...
> >I give up! I have a tab control user object - inherited from u_tab - and
> >some tab pages. Initially only one page is enabled which has a
> >datawindow. When a valid data is entered in the DW, I need to enable
> >rest of the tabs - Now - it is giving me a NULL object reference error
> >during execution for the following statement in an event of the DW -
> >tabcontrol.tabpage.enabled=TRUE
> >getparent( ) also giving errors - HELP! How can I do this?
> >Thanks!
> >Ragni
> >rpanjala@nsf.gov
> >



0
Ragni
4/29/1999 9:32:27 PM
Ragni:

Another way is to declare an instance variable (of the same type as tab
control say u_tab) in the tab control user object and assign the current
instance of the tab control to that, in the constructor event. You can
then reference this instance variable anywhere in the tab control or any
other controls placed in the tab control. In constructor event of tab
control you could write this:

// To assign the current instance of the tab control
iuo_tab = This

Then you could refer to any of the tab page (static), by using : 
          iuo_tab.your_tab_page

Again, as mentioned earlier by Ron, you need to have Create on demand
unchecked for this to work.

HTH.

Cheers.

Biju Nair.



Ragni wrote:
> 
> Nope - I do not have it on create on demand - anyway I got it working now -
> someone suggested a approach - create a tab type variable, using getparent() and
> parent functions, assign the tab control to this variable
> Ex:
> in script of the control on a tab page,
> tab temptab
> tabtemp=parent.getparent()
> 
> and then using control[] property acess the pages.
> 
> tabtemp.control[1].enabled=TRUE
> 
> again here   tabtemp.tabpage_2.enabled=TRUE type of expression would give a
> error.
>  I wonder if it is a bug in PB!
> Thanks anyway..
> 
> Ron Gallagher wrote:
> 
> > Ragni --
> >
> > If you have CreateOnDemand set for the tab, then the tab pages are not valid
> > until the user accesses them.  So, before you reference the tab page, make
> > sure it has been created by calling IsValid.
> >
> > HTH
> >
> > Ron Gallagher, CPDP
> > Atlanta, GA
> > rongallagher@mindspring.com
> >
> > Ragni wrote in message <3728B8DF.25D6219F@nsf.gov>...
> > >I give up! I have a tab control user object - inherited from u_tab - and
> > >some tab pages. Initially only one page is enabled which has a
> > >datawindow. When a valid data is entered in the DW, I need to enable
> > >rest of the tabs - Now - it is giving me a NULL object reference error
> > >during execution for the following statement in an event of the DW -
> > >tabcontrol.tabpage.enabled=TRUE
> > >getparent( ) also giving errors - HELP! How can I do this?
> > >Thanks!
> > >Ragni
> > >rpanjala@nsf.gov
> > >
0
Biju
4/29/1999 9:58:32 PM
Thanks! But can you tell me why I have do it this way? Why can't I directly access the
tab pages like anyother controls/objects with dot notations?

Biju Nair wrote:

> Ragni:
>
> Another way is to declare an instance variable (of the same type as tab
> control say u_tab) in the tab control user object and assign the current
> instance of the tab control to that, in the constructor event. You can
> then reference this instance variable anywhere in the tab control or any
> other controls placed in the tab control. In constructor event of tab
> control you could write this:
>
> // To assign the current instance of the tab control
> iuo_tab = This
>
> Then you could refer to any of the tab page (static), by using :
>           iuo_tab.your_tab_page
>
> Again, as mentioned earlier by Ron, you need to have Create on demand
> unchecked for this to work.
>
> HTH.
>
> Cheers.
>
> Biju Nair.
>
> Ragni wrote:
> >
> > Nope - I do not have it on create on demand - anyway I got it working now -
> > someone suggested a approach - create a tab type variable, using getparent() and
> > parent functions, assign the tab control to this variable
> > Ex:
> > in script of the control on a tab page,
> > tab temptab
> > tabtemp=parent.getparent()
> >
> > and then using control[] property acess the pages.
> >
> > tabtemp.control[1].enabled=TRUE
> >
> > again here   tabtemp.tabpage_2.enabled=TRUE type of expression would give a
> > error.
> >  I wonder if it is a bug in PB!
> > Thanks anyway..
> >
> > Ron Gallagher wrote:
> >
> > > Ragni --
> > >
> > > If you have CreateOnDemand set for the tab, then the tab pages are not valid
> > > until the user accesses them.  So, before you reference the tab page, make
> > > sure it has been created by calling IsValid.
> > >
> > > HTH
> > >
> > > Ron Gallagher, CPDP
> > > Atlanta, GA
> > > rongallagher@mindspring.com
> > >
> > > Ragni wrote in message <3728B8DF.25D6219F@nsf.gov>...
> > > >I give up! I have a tab control user object - inherited from u_tab - and
> > > >some tab pages. Initially only one page is enabled which has a
> > > >datawindow. When a valid data is entered in the DW, I need to enable
> > > >rest of the tabs - Now - it is giving me a NULL object reference error
> > > >during execution for the following statement in an event of the DW -
> > > >tabcontrol.tabpage.enabled=TRUE
> > > >getparent( ) also giving errors - HELP! How can I do this?
> > > >Thanks!
> > > >Ragni
> > > >rpanjala@nsf.gov
> > > >



0
Ragni
4/30/1999 5:25:40 PM
Reply:

Similar Artilces:

Deleting pages of tab control inside tab control
It's about Power Builder 5.0. I have one tab control and inside this other tab control with few pages. How can i delete these pages and how to get a popup menu for these tabpages ( right click shows only menu of older tab control ). I know how to perform it from older tab control and tab page but i am unable to do it when i am positioned on child tab pages. Answer me here or at marina@servomihalj.co.yu ...

Tab Control: How to show new page in same tab when hyperlink clicked on the same tab
I have a hyperlink in my TabPanel's user control (.ascx).  When clicked it tries to go to an entirely new page outside the tab control (which of course causes an error because a browser cannot load just an .ascx alone) instead of just refreshing and showing the new page in the same tab.  So when I click the hyperlink I get this error:This type of page is not served.BODY { FONT-WEIGHT: normal; FONT-SIZE: 0.7em; COLOR: black; FONT-FAMILY: "Verdana" } P { MARGIN-TOP: -5px; FONT-WEIGHT: normal; COLOR: black; FONT-FAMILY: "Verdana" } B { MARGIN-TOP: -5p...

Tab or Page control with static tabs
Does anyone know of a tab or page control where some of the leftmost tabs can be set as static so that they don't scroll? Roy Lambert ...

Disable tab pages if one tabs progress bar is loaded / flush events of tab control
Hello, I have a tabcontrol which contains tabpages. Each tab page take a while to load data for which i show a progress bar. [b] My issue here is while the progressbar is loaded user can click other tab and after completion of progress the control goes back to new tab selected. So i want to disable tabs till the progress bar is completed. I am using C# .net as code of my language. I tried with options: => tabenabled = false - but it doesnot worked!! Looking for a early positive reply.  ashish...

tab order in datawindow control in tab page
I have a window with a tab control and tab pages are opened dynamically. Each tabpage has a datawindow control. During runtime, the objects on the window are included in the tab order but the columns in the datawindow object on the tab page are not. Does anyone know how to include the fields in the datawindow control in the tab order so that when the user hits the tab key, focus does not move to another object on the window and moves to the next field in the datawindow object? Seems like a silly question, but did you check the tab order in the datawindow painter? What about th...

Dynamically creation of tab pages in tab control
Hi, iam using PB 8.0 . please let me know how to create tab pages dynamically in tab control and how to set the properties like Name, tab page text,.. to dynamically created tabpage. Thanks in advance On Jul 9, 8:18=A0pm, shk <krishnahar...@gmail.com> wrote: > Hi, > > iam using PB 8.0 . > please let me know how to create tab pages dynamically =A0in tab control > and how to set the properties like Name, =A0tab page text,.. to > dynamically created tabpage. > > Thanks in advance You need the opentab function which allows you to create any pre...

Tab control/selected tab page problem
First thing, we are using PB 6.0. When using tab controls, we cannot cause any tab page other than the one in index position 1 to be selected when opening a window. We have tried posting events that will perform the code after the window is visible, to no avail. I even tried using the movetab() function as a last resort. That worked, almost. It brings the tab page I want selected to the first position (the other tab pages are disabled, by the way). Then, when the user clicks a radio button, certain other tab pages are enabled. When they are enable, though, they get moved before t...

Tab Control
I have searched the forum and I cant seem to find the answer to my question, although I have tried some of the hints I have found with no luck....Can someone show me a working sample (with source code) of a page with a TabContainer and several tabs, with each tab having a user control, but the controls are not added/initialized/shown until the appropriate tab is shown/clicked?Something like this forum's "Write a New Post" page, where the tabs load after I click on them, and an animated picture displays to show that its loading.The solution needs to add user controls to the page...

TABS, TABS, AND MORE TABS.
Name: Danny Email: danheidiatrogersdotcom Product: Thunderbird Summary: TABS, TABS, AND MORE TABS. Comments: Hi Why is it that EVERYTIME I get a new upgrade whether on Firefox or Thunderbird, I get TABS? I now have an upgrade on Thunderbird and guess what, I have an 'Inbox' TAB that i don't know how to get rid of. Any ideas? Another issue is. Why doesn't Firefox display something telling me it is working/looking for the site I want. I click on a site and stare at Firefox and don't know if it is doing anything. The previous versions were mu...

Manipulating tab pages without focus to tab control.
Hi all, I'm trying to manipulate tab pages ( bring different page on top at different times) but I don't want the tab control to get focus or any control inside the tab page to get focus( if it doesn't have focus already). The only option right now is to either call SelectTab() function or modify 'SelectedTab' attribute. Either way the tab control is getting focus and whatever control in inside the tab page, gets the focus. I'm wondering if there is a way to achieve what I'm trying to do. I event tried 'BringToTop' attribute for the tab page ...

tab order on containing page and then tab through user control
I have a user control with several text boxes and check boxes on it, it is for data entry. I have set the tab order on the page that contains the user control, however when I tab to the user control it just skips right over it. How can I set the tab order so I can tab into the user control just like the rest of the container page?  Just apply tabindexes to your controls inside your user control i guessDon't forget to click "Mark as Answer" on the post that helped you. tompy_nation:Just apply tabindexes to your controls inside your user control i guess...

Uploading pages in different tabs of ajax tab control
Hi all, I have 6 different pages, each loading in a different tab of an ajax tab container. I have written my page in a way that on click on each tab, its related page is being loaded using update panel. The problem is this imposes a delay when user clicks and wants to move from tab to tab. On the other hand, I can change the page that all pages and contents get loaded and then be displayed as tabbed page. But in that case, it takes to long for all of them to be loaded at the same time. Waht I need is something in between. I want them to start loadning, first tab loads and user can work wit...

Tab page tabbing
Hi all, I had a post a couple of months back stating that I had a window with userobject (mimicking the left side of a Windows Explorer), a dw and a tab object. The tab settings for the objects on the tab page are set correctly, but when I issue a tab, the focus doesn't go to the expected object. The suggestion was that obviously focus was going somewhere else, but I don't know how to look for that. Does anyone have any tips? Thanks PB 10.2.1 (9537) ...

Tab control tabs
Hi, Is there a way to show the tabs of a tab control on the left (instead of the default “top”)?  (Something like the “Customer & Partner Solutions” on http://www.microsoft.com/en/us/default.aspx )  Thanks, Z   http://deluxe-tabs.com/file/templates/tabs-vertical-template.htmlGirijeshhttp://www.girijesh.in/ That’s nice… But I meant is it possible to do it with the AJAX tab control?  ...

Web resources about - Tab Controls/tab pages/controls within tab pages - sybase.powerbuilder.general

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

US Democratic candidates clash over gun control at debate
Hillary Clinton criticised over foreign policy and gun control but again confirms her position as frontrunner for the Democratic nomination. ...

Victorian fires out of control
Residents are being urged to evacuate as an out of control bushfire near the Indigo Valley in northern Victoria threatens homes. Courtesy ABC ...

As it happened: Fire crews battle out-of-control blazes in southern states
Emergency warnings are in place for a fire burning in Victoria's north-east while fire crews also tackle blazes in ACT, NSW and Tasmania.

Dell Issues Patch For Content Adaptive Brightness Control On The XPS 13
... issues, as all devices do. One that was very frustrating to deal with during the review was the aggressive Content Adaptive Brightness Control ...

Taliban forces take control of key district in Afghanistan's Helmand province
CNN Taliban forces take control of key district in Afghanistan's Helmand province CNN Kabul, Afghanistan (CNN) Taliban forces have taken almost ...

Whistleblower: Islamic Groups Control Narrative Of American Law Enforcement
'The Obama administration had a deadly blind spot when it comes to Islamic terrorism'

How Sepp Blatter Lost Control Of His Monster
If Sepp Blatter could take a step back and look at the bigger picture, forgetting for a moment that today’s eight-year ban from all soccer activities ...

This is what Street Fighter IV looks like with motion controls
Like most people it seems, I think that the Steam Controller has potential, but it just hasn't been realized yet. It's a great time to test ...

Memo To Gun Control Types In Congress: Money Is Fungible
As you know, around here we are about economics, not gun control and other such exciting subjects. We're also about policy which concerns economics, ...

Resources last updated: 12/22/2015 9:33:34 PM