RE: Upgraded tabbed_pane_widget

"Christian Boulanger" <[email protected]> Tue, 30 Sep 2003 01:52:58 +0200
Newsgroups gmane.comp.windows.devel.netwindows
Message-ID <000201c386e4$d0682ee0$16abfea9@Laptop>
For those who are interested in experimenting with some weird nW display
behaviour, try

http://www.panyasan.de/bibliograph-test/

with Internet Explorer and Moz. Somehow the themeing does not extend to all
widget parts  - in IE, the alert and the normal window have a transparent
background.

Also, there is some conflict between resizeable windows and splitpanes and
tabbed-panes which rely on absolute size numbers for construction. I have
also not figured out how to avoid multiple scrollbars. 

So much for now...

Christian 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Christian Boulanger
> Sent: Monday, September 29, 2003 6:14 PM
> To: 'netWindows development discussion list'
> Subject: RE: [NW-Devel] Upgraded tabbed_pane_widget
> 
> 
> OK, I got it to work. It required some hacking, though.
> 
> 1) This is how I construct the tabbed-pane-within-split-pane:
> 
>     // split pane
>     
>     cont = document.getElementById("container");
>     splitwin = new NW_WIDGET_FACTORY_split_pane(true, "200", true, 5);
>     cont.appendChild(splitwin.domNode);
>     splitwin.fixHeight();
>     left_pane =  splitwin.pane1obj.contentNode;
>     right_pane = splitwin.pane2obj.contentNode;
>     
>     //hack
>     left_pane.style.height = "470px";   // without absolute 
> size, scrollbars
> are incorrect
>     right_pane.style.height = "470px";
> 
>     // tabbed pane
>     
>     bib_pane = NW_WIDGET_FACTORY_tabbed_pane(600,470); // 
> fixme: automatic resizing?
>     
>     var start_tab = new NW_WIDGET_tab_ds("Introduction", 
> "start.html");
>     start_tab.getContent();
>     bib_pane.addTab(start_tab);
>     
>     // hack
>     start_tab.content.style.display = "block";  // otherwise, 
> nothing is displayed
>     bib_pane.domNode.style.margin = "0px";      
> 	// there is a large gap over the tab labels, some space 
> still remains after this hack
> 
>     right_pane.appendChild(bib_pane.domNode);
> 
> There is still a really oversized padding within the pane 
> content box which I would like to get rid of eventually.
> 
> 2) To get this to work in IE, I had to remove the source of 
> exceptions thrown in the widget:
> 
> tabbed_pane_widget.js
> 
> 266	if((this.name.trim() != "")&&(!this.content)){
> 		__util__.setClass(content, 
> "TabbedPane-content-div-" + this.name );
> 	}
> 
> Needed to be changed to 
> 
> 266	if((this.name.trim() != "")&&(***this.content)){
> 		__util__.setClass(**this**.content,
> "TabbedPane-content-div-" + this.name );
> 	}
> 
> I don't know if this is what the author intended, but it 
> works like this now without IE throwing an exception.
> 
> 3) I can creat new tabs with the following code
> 
>     // open bibliography 
>     
>     var newBibTab = document.createElement("div");
>     var newBib = new _bibliography_(
>         treeObj.type,
>         treeObj.sourceName,
>         treeObj.curBranchName,
>         branchId,
>         newBibTab
>     );
>     var newTab = new 
> NW_WIDGET_tab_ds(treeObj.curBranchName,"",newBibTab);
>     bib_pane.addTab(newTab);
>     newTab.content.style.display = "block";
> 
> Several problems remain:
> - The added tab does not display automatically, I have to click on it
> - If I try bib_pane.switchDisp(newTab), an exception is 
> thrown inside nW.
> - the new tab content is temporarily attached to the bottom 
> of the currently visible tab (this disappears after clicking 
> the tabs).
> 
> So much feedback for now...
> 
> Christian 
> 
> 
> _______________________________________________
> The netWindows developers list: [email protected] 
> http://netwindows.org/mailman/listinfo/devel_netwindows.org
> 
> 


_______________________________________________
The netWindows developers list: [email protected]
http://netwindows.org/mailman/listinfo/devel_netwindows.org