Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Auto hide/reveal tabs based on data
Marc Johnson
Posts: 252
 
Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Sep 06 8:36 AM
fiogf49gjkf0d
Ok here is one of my first project ideas for my new company. We sell a number of products, each with their own details. My thought is to hide or unhide detail tabs for each of these various products depending on if they exist in the accounts product table.

Example:
Company 1 has products A, B, & C
Company 2 has products B & C.

Company 1 should have three tabs, one for A, B, & C.
Company 2 should only have two tabs, one for B & C.

That's idea 1.

My second idea, similar to the first, uses one Account tab and under it uses the tab control to hide specific tabs (if possible) under there. So the user isn't bombarded with potentially many tabs for each account.

I think idea 2 is more elegant, but i'd like some feedback before I try to move forward on this idea.

FYI, as far as I know there would only be one version of each product under each account, so there would be no reason for two product A tabs or something of that nature, though that would be a nice addition to this plan.
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Sep 06 10:54 AM
fiogf49gjkf0d
I suggest approach 2. There are bugs/unpredictable behavior with the MainView tabs.

This will hide the first tab in the collection of a tab control.

tabcontrol1.Tabs(0).TabVisible = false

Timmus
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Sep 06 3:41 PM
fiogf49gjkf0d
I suggest approach 3: Use panels instead of tabs. Hide/Show a series of panels to make it look as if it's one big screen when in fact it's little subsets of information that when combined equal the whole. I do this on a number of my projects but they are in custom forms which have more real estate. Panels may not work for tabs that are associated with a MainView detail for example.
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Oct 06 7:20 AM
fiogf49gjkf0d
Jeremy,

They are already doing this on some screens and considered it for this project. The problem we found would be that while there is only about 8 products now (could be managable with showing/hiding panels) the product line is very likely to increase greatly. This makes tabs a more managable option. A new product comes online, a new tab is added. A few controls and logic and it's done.

Both options are equally viable, I just feel like tabs would be a better fit in this case. May just be personal preference too.
[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Oct 06 3:22 PM
fiogf49gjkf0d
Marc, I like to use panels aslo, what about creating the panels or the tabs for that matter on the fly based on the product listings, this way you only have to enter the product in the product tables and be done.

Rich
[Reply][Quote]
Marc Johnson
Posts: 252
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 06 9:19 AM
fiogf49gjkf0d
Rich,

I was actually considering that but I'm not certain how to dynamically populate a field like that. Or would the forms exist but only be added to the account when the account product was listed?

Marc
[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 06 10:46 AM
fiogf49gjkf0d
Marc,

I have not tried this yet in SLX however in vb you can use the controls.add to add a new dynamically created control. I thought a while back Ryan posted an artical on this however I can not find it now.

Anyone else with help on Creating the control dynamically inside SLX.. in VB you can:

MyForm.Controls.Add("Label", "myLabel") 'create the control
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 06 12:46 PM
fiogf49gjkf0d
Quote:
Originally posted by RJ Eaton

Marc,
Anyone else with help on Creating the control dynamically inside SLX.. in VB you can:

MyForm.Controls.Add("Label", "myLabel") 'create the control

Doesn't work. All controls on a form have to be created at design time. You could create control "templates" that function as multiple fields on a form but it's a bit of work to set that all up.

The only other thing I know of that comes close is a dynamic datagrid with inline editing.
[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 06 1:11 PM
fiogf49gjkf0d
Might be a good suggestion to SLX to add the Controls.Add..??
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Auto hide/reveal tabs based on dataYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 06 1:54 PM
fiogf49gjkf0d
Believe me, this has been suggested many times. The problem is that we're dealing with VBScript here .

My suggestion is to use .NET Extensions (if you're on v7) and if not, you can still use .NET (you don't need v7 to build customs in .NET for SLX) whenever you need to dynamically create controls for a requirement.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 4:26:37 PM