• 全部
  • .NET Framework
  • ASP
  • Web Services
  • .NET互联网桌面应用
  • VB
  • 图表区
  • 分析与设计
  • 组件/控件开发
  • AppLauncher
  • 问答

满分求iewc:tabstrip能不能分成两行与multipage连用

newredhat 2007-01-08 09:40:07

能不能达到下面的效果
tabstrip1 tabstrip2 ...tabstrip6
tabstrip7 tabstrip8 ...tabstrip12
--------------------------------------------
| |
| |
| |
| multipage |
| |
| |
| |
--------------------------------------------
...全文
269 点赞 收藏 18
写回复
18 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
newredhat 2007-01-09

iewc 需要重新添加 移除项吗??
为什么 报错
我把CC1 替换成了 iewc 就是实现了竖排

我重新来一遍再试试
回复
newredhat 2007-01-09
牛!~!~
但还有点问题,我测试了下,全都是竖的一列,
我是想这样 比如有14个Tab 分成两排,一排7个
这样的效果能做到吗?
回复
newredhat 2007-01-09
太热心了,这么快,我试试
回复
cpp2017 2007-01-08
看了半天,才知道不是 server端的事,要改htc.下午继续。
回复
newredhat 2007-01-08
老大,有空帮我看看吧,太谢谢了
回复
cpp2017 2007-01-08
==我看看先。看微软的这个东西得花点力气,什么时候看得相当熟练了,应该会有相当的提高。 顺便说一下,我目前还不熟练。
回复
newredhat 2007-01-08
老大,我看了TabItem.cs了,一点头绪都没有,
能不能给指点下
回复
cpp2017 2007-01-08
try: TabItem.cs中修改.
回复
newredhat 2007-01-08
吐血
怎么改?
回复
cpp2017 2007-01-08
不行的. 唯一的办法就是改写这个控件,它的源码是公开的.改一下
回复
nayc 2007-01-08
加个<br>试试
回复
cpp2017 2007-01-08
调用: TabTrip 加上属性: Orientation="Vertical" Columns="3" 如: <CC1:TABSTRIP id="TabStrip1" runat="server" sepdefaultstyle="border-bottom:solid 1px #336699;width:100%" tabdefaultstyle="color:black;border-top:solid 1px white;border-left:solid 1px white;border-right:solid 1px gray;border-bottom:solid 1px black;background:#eeeef1;;padding-right:5px;padding-left:10px;padding-right:10px;" tabhoverstyle="border-top:solid 1px white;border-left:solid 1px white;border-right:solid 1px gray;border-bottom:solid 1px gray;background:#d6e3f7;;padding-right:5px;padding-left:10px;padding-right:10px;" tabselectedstyle="border-left:solid 1px white;border-top:solid 1px #d6e3f7;background:#dddddd;;padding-right:5px;color:black;height:22px;padding-left:10px;padding-right:10px;border-bottom:solid 1px #eeeef1;border-right:solid 1px black;color:white;background-color:orange" Orientation="Vertical" Columns="3" targetid="MultiPage1" > <CC1:TAB Text="Tab 1" /> <CC1:TAB Text="Tab 2" /> <CC1:TAB Text="Tab 3" /> <CC1:TAB Text="Tab 4" /> <CC1:TAB Text="Tab 5" /> <CC1:TAB Text="Tab 6" /> <CC1:TAB Text="Tab 6" /> <CC1:TAB text="代缴话费"></CC1:TAB> <CC1:TAB text="缴费撤消"></CC1:TAB> <CC1:TABSEPARATOR></CC1:TABSEPARATOR> </CC1:TABSTRIP> <CC1:MULTIPAGE id="MultiPage1" style="BORDER-RIGHT: #336699 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: medium none; PADDING-LEFT: 0px; PADDING-BOTTOM: 5px; BORDER-LEFT: white 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: #336699 1px solid" runat="server"> <CC1:PAGEVIEW id="T1"> A </CC1:PAGEVIEW> <CC1:PAGEVIEW id="T3"> B </CC1:PAGEVIEW> <CC1:PAGEVIEW id="T4"> C </CC1:PAGEVIEW> <CC1:PAGEVIEW id="T5"> D </CC1:PAGEVIEW> <CC1:PAGEVIEW id="T6"> E </CC1:PAGEVIEW> <CC1:PAGEVIEW id="T7"> F </CC1:PAGEVIEW> </CC1:MULTIPAGE>
回复
cpp2017 2007-01-08
function f_GetTab(index) { var nIndex = f_ConvertIndexToNodeIndex(index); if (nIndex >= 0) { var oTab = _Tabs.children[nIndex]; return _bHorizontal ? oTab : oTab.childNodes[0]; } if(!_bHorizontal && nIndex == -1 && index>=0) { var col = element.Columns; if(col !=null) { col = parseInt(element.Columns); var rowIndex = Math.floor((index+1) / col)-1 ; //alert(index +1); if( (index +1) % col != 0) { rowIndex ++; } //alert("row:"+rowIndex + (index +1) % col ); return _Tabs.rows[rowIndex].cells[index % col]; } } return null; }
回复
cpp2017 2007-01-08
function f_Init() { f_AddStopEvent(); var cacheImageDef = new Image(); var cacheImageHov = new Image(); var cacheImageSel = new Image(); cacheImageDef.src = sepDefaultImageUrl; cacheImageHov.src = sepHoverImageUrl; cacheImageSel.src = sepSelectedImageUrl; _StateVals["default"] = _StateDefault; _StateVals["hover"] = _StateHover; _StateVals["selected"] = _StateSelected; var oRoot = element.document.createElement("SPAN"); oRoot.innerHTML = innerHTML; var oTable = element.document.createElement("TABLE"); var oTBody = element.document.createElement("TBODY"); oTable.style.fontSize = currentStyle.fontSize; oTable.style.fontFamily = currentStyle.fontFamily; oTable.style.fontWeight = currentStyle.fontWeight; oTable.style.color = currentStyle.color; oTable.cellSpacing = 0; oTable.cellPadding = 0; oTable.border = 0; if (element.currentStyle.direction != element.style.direction) oTable.style.direction = element.currentStyle.direction; else oTable.style.direction = element.style.direction; oTable.dir = element.dir; if (element.currentStyle.height != null) oTable.style.height = element.currentStyle.height; if (element.currentStyle.width != null) oTable.style.width = element.currentStyle.width; var oRow = null; if (_bHorizontal ) { oRow = element.document.createElement("TR"); oTBody.appendChild(oRow); } var col = element.Columns; if(col == null) { col = 1; } for (var nIndex = 0; nIndex < oRoot.children.length; nIndex++) { if (!_bHorizontal && (nIndex == col || ( nIndex % col ==0 && nIndex != col ) ) ) { //找到分隔列 if (nIndex == col ) { for(var i = 0;i<oRoot.children.length;i++) { if(oRoot.children[i].tagName.toLowerCase() == "tabseparator") { var rowspan = oRoot.children.length / (col); if(oRoot.children.length %(col+1) != 0) { rowspan = parseInt(rowspan)+1; } f_AppendTabContent(oRow, oRoot.children[i],rowspan); } } } if(nIndex != oRoot.children.length-1) { oRow = element.document.createElement("TR"); oTBody.appendChild(oRow); } } var oNode = oRoot.children[nIndex]; var szTagName = oNode.tagName.toLowerCase(); if ((szTagName != "tab") && (szTagName != "tabseparator")) continue; if(szTagName == "tabseparator" && !_bHorizontal) { continue;//已经处理 } f_AppendTabContent(oRow, oNode); } _Tabs = _bHorizontal ? oTBody.childNodes[0] : oTBody; oTable.appendChild(oTBody); var numTabs = f_NumTabs() if (numTabs > 0) { var curIndex = _nSelectedIndex; _nSelectedIndex = -1; if (curIndex != -1) { if ((curIndex < 0) || (curIndex >= numTabs)) curIndex = 0; f_SetSelectedIndex(curIndex); } } else { _nSelectedIndex = -1; } var oBody = element.document.createElement("BODY"); var oHtml = element.document.createElement("HTML"); oBody.appendChild(oTable); oHtml.appendChild(oBody); defaults.viewLink = oHtml.document; _InInit = false; //alert(oTable.innerHTML); window.clipboardData.setData("text",oTable.innerHTML); }
回复
cpp2017 2007-01-08
function f_AppendTabContent(parent, node,rowspan) { var szTagName = node.tagName.toLowerCase(); var isTab = (szTagName == "tab"); var oCell = element.document.createElement("TD"); oCell.mergeAttributes(node, false); if (isTab) { oCell.setAttribute("_type", "tab", 0); oCell.attachEvent("onclick", f_TabClick); oCell.attachEvent("onmousedown", f_TabClick); oCell.attachEvent("onmouseover", f_TabOver); oCell.attachEvent("onmouseout", f_TabOut); oCell.setAttribute("index", _NumTabs, 0); _NumTabs++; } else if (szTagName == "tabseparator") { oCell.setAttribute("_type", "separator", 0); if(rowspan != null) { oCell.rowSpan = rowspan; } } else { return; } var cacheImageDef = new Image(); var cacheImageHov = new Image(); var cacheImageSel = new Image(); cacheImageDef.src = node.getAttribute("defaultImageUrl"); cacheImageHov.src = node.getAttribute("hoverImageUrl"); cacheImageSel.src = node.getAttribute("selectedImageUrl"); var content; if (isTab) { content = element.document.createElement("A"); oCell.appendChild(content); if (oCell.tabIndex > 0) { content.tabIndex = oCell.tabIndex; oCell.tabIndex = -1; } if (oCell.title != "") { content.title = oCell.title; oCell.title = ""; } } else { content = oCell; } var szText = node.getAttribute("text"); if (szText != null) { var oTextSpan = element.document.createElement("SPAN"); oTextSpan.innerText = szText; content.appendChild(oTextSpan); } else { while (node.childNodes.length > 0) content.appendChild(node.childNodes[0]); } f_ApplyState(oCell, "default"); oCell.noWrap = true; oCell.attachEvent("onkeyup", f_OnTabKeyUp); parent.appendChild(oCell); }
回复
cpp2017 2007-01-08
要改以下三个函数: f_GetTab f_Init f_AppendTabContent
回复
相关推荐
发帖
.NET技术社区
创建于2007-09-28

5.8w+

社区成员

.NET技术交流专区
申请成为版主
帖子事件
创建了帖子
2007-01-08 09:40
社区公告
暂无公告