DecoratedTabPanel에서 탭의 색상을 변경하려면 어떻게해야합니까? 나는 콘텐츠를 의미하는 것이 아니라 탭을 선택하기 위해 클릭하는 버튼을 의미합니다.GWT DecoratedTabPanel 탭 버튼 색상
1
A
답변
3
내가 할 수있는 한, 실제로 이렇게하는 것이 쉬운 방법이 아닙니다. 데코레이션 된 탭 패널은 멋진 둥근 모서리를 얻기 위해 중첩 된 테이블의 레이어를 사용하므로 탭의 색상을 변경하기 위해 및을 둥근 모서리로 변경해야합니다.
다음은 탭에 대한 GWT 기본 스타일입니다. 원하는 효과 (bg 색상 찾기)를 얻기 위해 스타일 시트에서 재정의 할 필요가있는 것은 꽤 분명해야합니다.
.gwt-TabBar {
}
.gwt-TabBar .gwt-TabBarFirst {
width: 5px; /* first tab distance from the left */
}
.gwt-TabBar .gwt-TabBarRest {
}
.gwt-TabBar .gwt-TabBarItem {
margin-left: 6px;
padding: 3px 6px 3px 6px;
cursor: pointer;
cursor: hand;
color: black;
font-weight: bold;
text-align: center;
background: #d0e4f6;
}
.gwt-TabBar .gwt-TabBarItem-selected {
cursor: default;
background: #92c1f0;
}
.gwt-TabBar .gwt-TabBarItem-disabled {
cursor: default;
color: #999999;
}
.gwt-TabPanel {
}
.gwt-TabPanelBottom {
border-color: #92c1f0;
border-style: solid;
border-width: 3px 2px 2px;
overflow: hidden;
padding: 6px;
}
.gwt-DecoratedTabBar {
}
.gwt-DecoratedTabBar .gwt-TabBarFirst {
width: 5px; /* first tab distance from the left */
}
.gwt-DecoratedTabBar .gwt-TabBarRest {
}
.gwt-DecoratedTabBar .gwt-TabBarItem {
border-collapse: collapse;
margin-left: 6px;
}
.gwt-DecoratedTabBar .tabTopCenter {
padding: 0px;
background: #d0e4f6;
}
.gwt-DecoratedTabBar .tabTopLeft,
.gwt-DecoratedTabBar .tabTopRight {
padding: 0px;
zoom: 1;
}
.gwt-DecoratedTabBar .tabTopLeftInner,
.gwt-DecoratedTabBar .tabTopRightInner {
width: 6px;
height: 6px;
}
.gwt-DecoratedTabBar .tabTopLeft {
background: url(images/corner.png) no-repeat 0px -55px;
-background: url(images/corner_ie6.png) no-repeat 0px -55px;
}
.gwt-DecoratedTabBar .tabTopRight {
background: url(images/corner.png) no-repeat -6px -55px;
-background: url(images/corner_ie6.png) no-repeat -6px -55px;
}
* html .gwt-DecoratedTabBar .tabTopLeftInner,
* html .gwt-DecoratedTabBar .tabTopRightInner {
width: 6px;
height: 6px;
overflow: hidden;
}
.gwt-DecoratedTabBar .tabMiddleLeft,
.gwt-DecoratedTabBar .tabMiddleRight {
width: 6px;
padding: 0px;
background: #d0e4f6;
}
.gwt-DecoratedTabBar .tabMiddleLeftInner,
.gwt-DecoratedTabBar .tabMiddleRightInner {
width: 1px;
height: 1px;
}
.gwt-DecoratedTabBar .tabMiddleCenter {
padding: 0px 4px 2px 4px;
cursor: pointer;
cursor: hand;
color: black;
font-weight: bold;
text-align: center;
background: #d0e4f6;
}
.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
background: #92c1f0;
}
.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
background-position: 0px -61px;
}
.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
background-position: -6px -61px;
}
.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
background: #92c1f0;
}
.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter {
cursor: default;
background: #92c1f0;
}
.gwt-DecoratedTabBar .gwt-TabBarItem-disabled .tabMiddleCenter {
cursor: default;
color: #999999;
}
4
원하는 작업은 Change the CSS of GWT tabBar Items입니다. 나는 다음과 같은 CSS 코드가 당신의 특정 상황에서 할 것이라고 생각한다. 또한
.gwt-DecoratedTab*Bar* .gwt-TabBarItem { background:#FF0; }
는
this site 및
this reference를 보라.
관련 문제
- 1. 버튼 색상 변경시 아이콘 색상
- 2. GWT CellTable의 셀 색상
- 3. TabLayoutPanel는 탭 GWT
- 4. GWT 피드백 탭
- 5. 다른 탭에서 GWT 탭 추가
- 6. 자바 스윙 버튼 색상
- 7. UINavigationBar : 버튼 글꼴 색상
- 8. 토글 버튼 누르기 색상
- 9. 색상 지정 버튼
- 10. 탭 아래에있는 최대 탭 수 및 색상?
- 11. WPF 탭 컨트롤 : 설정 탭 색상?
- 12. GWT 토글 버튼
- 13. 안드로이드의 탭 옆에있는 버튼
- 14. TabLayoutPanel에서 탭 제거 programly, GWT
- 15. 탭 컨테이너 - 버튼 이벤트 탭 컨테이너하자에서
- 16. 텍스트 필드의 버튼 색상 지우기
- 17. 버튼 태그 테두리 색상 변경
- 18. gwt get 배열 버튼 값
- 19. 만들기 안드로이드 마켓 탭 버튼
- 20. Android 버튼 탭 슬롭 영역
- 21. DecoratedTabPanel 테두리를 사라지게 만드는 방법은 무엇입니까?
- 22. GWT FocusPanel, 탭 키 및 포커스 핸들러
- 23. 두 번째 버튼 클릭 후 색상 전환
- 24. 표준 팝업 동작에서 버튼 색상 변경
- 25. 버튼 상태의 라벨 색상 변경 (FLex 4)
- 26. Tcl/Tk의 라디오 버튼 색상 8.5
- 27. cocos2d에서 버튼 클릭 이벤트의 라인 색상 변경
- 28. wordpress 아래의 Tweetmeme 버튼 색상 변경
- 29. GWT 페이지에서 저장 버튼 활성화 및 비활성화
- 30. GWT 푸시 버튼 파란색 테두리 동작
빠른 답변 주셔서 감사합니다.하지만 해결책은 모든 탭의 색칠 가능성이 높습니다. 하나의 탭 버튼의 배경을 변경하고 싶습니다. – kaboom