control array of tab control

Hello friends,

Is it possible to get the type of control on a tab control? I have a
function that will check the tab control's control array for each and
every control, and than check the typeof(), however, the typeof is only
userobject, irrespective of what control i put on the tab. For example
my tab control has datawindows, buttons and dropdown list box, however
when I do the typeof() checking its only returning UserObject! how do i
check if that particular userobject is a datawindow or button? I hope
there is a solution.

Your help appreciated.

Syed.

-- 
Syed Ibrahim 
Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan
Raja Laut, 50350 Kuala Lumpur, Malaysia
Tel: (03) 295-3472, (03) 294-3000  Fax: (03) 294-6587, (03) 293-3154
0
Syed
8/7/1998 2:57:58 AM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

2 Replies
1000 Views

Similar Articles

[PageSpeed] 7
Get it on Google Play
Get it on Apple App Store

Syed,

The Typeof() for  tab page will return UserObject!.
In order to find the Object Enum Type for object within each tab page,
you have to loop thro the Control array for each tab page.

A sample code is given below:


Int li_totpages,li_totcontrols,li_pageindex,li_controlindex
object l_object

li_totpages = UpperBound(tab_1.Control)

//Loop thro the pages
For li_pageindex = 1 to li_totpages

 l_object = tab_1.Control[li_pageindex].Typeof() //returns userobject

 li_totcontrols = UpperBound(tab_1.Control[li_pageindex].Control)

 //Loop thro the Controls within each Tab page
 For li_controlindex = 1 to li_totcontrols

  //returns Object Enumerated Type within each Tab page
   l_object = tab_1.Control[li_pageindex].Control[li_controlindex].Typeof()


 Next

Next


John Zachariah
jzachy@rocketmail.com

Syed wrote:

> Hello friends,
>
> Is it possible to get the type of control on a tab control? I have a
> function that will check the tab control's control array for each and
> every control, and than check the typeof(), however, the typeof is only
> userobject, irrespective of what control i put on the tab. For example
> my tab control has datawindows, buttons and dropdown list box, however
> when I do the typeof() checking its only returning UserObject! how do i
> check if that particular userobject is a datawindow or button? I hope
> there is a solution.
>
> Your help appreciated.
>
> Syed.
>
> --
> Syed Ibrahim
> Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan
> Raja Laut, 50350 Kuala Lumpur, Malaysia
> Tel: (03) 295-3472, (03) 294-3000  Fax: (03) 294-6587, (03) 293-3154



0
John
8/7/1998 6:54:09 AM
Thanks Zach,

:) finally I got it work. Thanks.

Syed.

John Zachariah wrote:
> 
> Syed,
> 
> The Typeof() for  tab page will return UserObject!.
> In order to find the Object Enum Type for object within each tab page,
> you have to loop thro the Control array for each tab page.
> 
> A sample code is given below:
> 
> Int li_totpages,li_totcontrols,li_pageindex,li_controlindex
> object l_object
> 
> li_totpages = UpperBound(tab_1.Control)
> 
> //Loop thro the pages
> For li_pageindex = 1 to li_totpages
> 
>  l_object = tab_1.Control[li_pageindex].Typeof() //returns userobject
> 
>  li_totcontrols = UpperBound(tab_1.Control[li_pageindex].Control)
> 
>  //Loop thro the Controls within each Tab page
>  For li_controlindex = 1 to li_totcontrols
> 
>   //returns Object Enumerated Type within each Tab page
>    l_object = tab_1.Control[li_pageindex].Control[li_controlindex].Typeof()
> 
>  Next
> 
> Next
> 
> John Zachariah
> jzachy@rocketmail.com
> 
> Syed wrote:
> 
> > Hello friends,
> >
> > Is it possible to get the type of control on a tab control? I have a
> > function that will check the tab control's control array for each and
> > every control, and than check the typeof(), however, the typeof is only
> > userobject, irrespective of what control i put on the tab. For example
> > my tab control has datawindows, buttons and dropdown list box, however
> > when I do the typeof() checking its only returning UserObject! how do i
> > check if that particular userobject is a datawindow or button? I hope
> > there is a solution.
> >
> > Your help appreciated.
> >
> > Syed.
> >
> > --
> > Syed Ibrahim
> > Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan
> > Raja Laut, 50350 Kuala Lumpur, Malaysia
> > Tel: (03) 295-3472, (03) 294-3000  Fax: (03) 294-6587, (03) 293-3154

-- 
Syed Ibrahim 
Sapura Advanced Systems Sdn. Bhd, 18th Floor, Menara Tun Razak, Jalan
Raja Laut, 50350 Kuala Lumpur, Malaysia
Tel: (03) 295-3472, (03) 294-3000  Fax: (03) 294-6587, (03) 293-3154
0
Syed
8/7/1998 1:16:21 PM
Reply:

Similar Artilces:

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 Ragni -- If you have CreateOnDemand set for the tab, then the tab pages are not valid until the user accesses them. ...

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

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

list of controls in tab control
dear friends, I want to create an ancestor window for reporting with one command button (cb_retrieve) and one tab control. In the descendant window (inherited from the above ancestor window): user can expand the tab control to include n tabpages (where n is the number of tabpages added by user) that contain one datawindow for each tabpage What I want to achieve is that when user clicks on cb_retrieve: * the descendant window immediately runs the script in the ancestor level and retrieve all datawindows in each tabpages with no programming required. (since all programming tas...

Tab Control Covers all other controls
I have a tab control in a window, and every control (whether text, rbutton, command button, etc...) that I put on that tab seems to then become hidden by the tab control upon display of the window. Is there a property setting that I am missing, or what???? Steve, Check to see if there's any code in the tab control's Resize event. HTH, Eric Tanafon steve thompson wrote in message <3586DB3F.9B0A98E5@mailstn.sarmc.org>... >I have a tab control in a window, and every control (whether text, >rbutton, command button, etc...) that I put on that tab seems to then...

Referencing controls in a tab control
I have Form1 that has a tab control tabctrl_1 with a page tabpage1. On that tabpage1 I have placed a datawindow control dw_1. From an event on Form1 (or anywhere else for that matter) how do I reference the datawindow control dw_1? This doesn't work: tabctrl_1->dw_1->RowCount() In Powerbuilder it would look something like this: tabctrl_1.tabpage1.dw_1.RowCount() How can I (should I) do this in Power++? -- Jim Egan [TeamPS] Dealer Solutions, LLC Houston, TX A quick way to do this is to turn on the ControlsPublic checkbox on the tab control. Your code will then...

Question on Control Array or Control[]
I have some question about the Control Array or Control[] Does anyone nowhere I can fine out how it is defined ? ie its structure. I am using the control array to get all of the controls from a window and changing each control's text to French or English depending on a variable. The function call is fired on the open event of each window. This is simple enough. My problem is a Control of type DataWindow. I what to change the statictext fields to French or English, but don't know to access them genertically from the Control Array. If control[x].typeof() = DataWi...

list of controls in a tab control
dear friends, I want to create an ancestor window for reporting with one command button (cb_retrieve) and one tab control. In the descendant window (inherited from the above ancestor window): user can expand the tab control to include n tabpages (where n is the number of tabpages added by user) that contain one datawindow for each tabpage What I want to achieve is that when user clicks on cb_retrieve: * the descendant window immediately runs the script in the ancestor level and retrieve all datawindows in each tabpages with no programming required. (since all programming tas...

Grid controls and Tab controls
I have an app that has several Tabs. I need to know if there is a way to switch from Tab_A to Tab_B by using a HotKey. I know that it can be done if you hit the tab key enough to get to the Tabs and then use the arrow keys to move to the desired Tab. Also, I have several grid controls. I have a button that will add a row to the grid control. The button can be activated using a HotKey. From there the users want to be able to tab into the grid control. Right now they have to use the mouse to put the cursor into any cell in the grid control. Is there a way around this? TIA Nate Kane...

tab control and popup control
hi allI have the below code for my Ajax enabled website...Now when  i click global home page(that is tab 1) i want the pop control extender to pop up....i gave the control id as tab1 but it is not doing tht...what do i do now?what should i give in targetcontrolid=? <%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1/...

The Tabs control in the AJAX Control Toolkit behaves like a regular postback control
I have the following markup in an ASP.NET page:<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"><title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div>   <cc1:ToolkitScriptManager runat="Server" EnablePartialRendering="true" ID="ScriptManager1"></cc1:ToolkitScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <cc1:TabContainer ID="TabC...

Set the control's tab order in a tab control
How can I set the control's tab sequence in a tab page? Charles Right click inside the tab page, and select Tab order from the right mouse menu. Get out of tab order using the menu or toolbar. Kent Piland Charles wrote: > How can I set the control's tab sequence in a tab page? > > Charles ...

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this?  AllAboutFocus.com. Information Technolo...

Web resources about - control array of tab control - 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 ...

Control chaos while Devouring Stars in this strategy game
Devouring Stars Control chaos while Devouring Stars in this strategy game is a story by AppAdvice.com AppAdvice - iPhone, iPad, iPod, App Reviews ...

Nuance’s voice control going where Siri, Google Now and Cortana fall short
... for Samsung's S Voice and Apple’s Siri, is ready to go where no other digital assistant has gone before. The company wants to bring voice control ...

EU Acts on Refugees, Terrorism With Tougher Border Controls
Beset by the refugee crisis and fears of terrorism, the European Union floated plans to stiffen its external border controls for Europeans and ...

Sandy Hook parents assess victories, defeats in gun control mission
CBS News Sandy Hook parents assess victories, defeats in gun control mission CBS News NEWTOWN, Conn. Three years ago on Monday, a gunman opened ...

Apple is about to take even more control
... be about to get tough for some Apple partners as the company invests in top secret display technology development labs and increases its control ...

Google Updates BigQuery With New Cost Controls
Enterprises using BigQuery to run analytics against large data sets can now set a daily query quota on a project-wide or an individual basis. ...

After losing control of Parliament, Venezuelan socialists create a new one
After losing control of Parliament, Venezuelan socialists create a new one

Battle to control key Taiwan chip group
ASE makes $4bn takeover offer for local rival to thwart approach by China’s Tsinghua Unigroup

Anti-Terror: Visa Control, Airstrikes Seen as Most Effective
Americans are most likely to see overhauling the nation's visa waiver program and intensifying airstrikes against the Islamic State as effective ...

Resources last updated: 12/17/2015 10:39:45 AM