当前位置: 首页>>代码示例>>C++>>正文


C++ JXStaticText::SetBorderWidth方法代码示例

本文整理汇总了C++中JXStaticText::SetBorderWidth方法的典型用法代码示例。如果您正苦于以下问题:C++ JXStaticText::SetBorderWidth方法的具体用法?C++ JXStaticText::SetBorderWidth怎么用?C++ JXStaticText::SetBorderWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JXStaticText的用法示例。


在下文中一共展示了JXStaticText::SetBorderWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: JXFlatRect

void
JXTipOfTheDayDialog::BuildWindow
	(
	const JBoolean showStartupCB,
	const JBoolean showAtStartup
	)
{
// begin JXLayout

	JXWindow* window = new JXWindow(this, 410,260, "");
	assert( window != NULL );

	JXFlatRect* sideBar =
		new JXFlatRect(window,
					JXWidget::kFixedLeft, JXWidget::kVElastic, 10,10, 50,200);
	assert( sideBar != NULL );
    sideBar->SetColor((GetColormap())->GetInactiveLabelColor());

	itsCloseButton =
		new JXTextButton(JGetString("itsCloseButton::JXTipOfTheDayDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 340,225, 60,20);
	assert( itsCloseButton != NULL );

	itsNextTipButton =
		new JXTextButton(JGetString("itsNextTipButton::JXTipOfTheDayDialog::JXLayout"), window,
					JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,225, 60,20);
	assert( itsNextTipButton != NULL );
	itsNextTipButton->SetShortcuts(JGetString("itsNextTipButton::JXTipOfTheDayDialog::shortcuts::JXLayout"));

	JXImageWidget* icon =
		new JXImageWidget(sideBar,
					JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,15, 30,30);
	assert( icon != NULL );

	JXScrollbarSet* scrollbarSet =
		new JXScrollbarSet(window,
					JXWidget::kHElastic, JXWidget::kVElastic, 60,60, 340,150);
	assert( scrollbarSet != NULL );

	JXStaticText* title =
		new JXStaticText(JGetString("title::JXTipOfTheDayDialog::JXLayout"), window,
					JXWidget::kHElastic, JXWidget::kFixedTop, 60,10, 340,50);
	assert( title != NULL );

	itsShowAtStartupCB =
		new JXTextCheckbox(JGetString("itsShowAtStartupCB::JXTipOfTheDayDialog::JXLayout"), window,
					JXWidget::kFixedLeft, JXWidget::kFixedBottom, 10,225, 140,20);
	assert( itsShowAtStartupCB != NULL );

// end JXLayout

	window->SetTitle("Tip of the Day");
	window->LockCurrentMinSize();
	window->PlaceAsDialogWindow();

	JXDisplay* display = GetDisplay();
	JXImage* wIcon     = new JXImage(display, jx_tip_of_the_day);
	assert( wIcon != NULL );
	window->SetIcon(wIcon);

	sideBar->SetColor((GetColormap())->GetGrayColor(50));
	icon->SetXPM(jx_tip_of_the_day, (GetColormap())->GetGrayColor(50));

	title->SetBorderWidth(kJXDefaultBorderWidth);
	title->TESetLeftMarginWidth(5);
	title->SetBackColor(title->GetFocusColor());
	title->JTextEditor::SetFont(1, title->GetTextLength(), "Times", 18,
								JFontStyle(kJTrue, kJFalse, 0, kJFalse), kJTrue);
	title->SetCaretLocation(1);
	title->Paste("\n");

	itsText =
		new JXStaticText("", kJTrue, kJFalse,
						 scrollbarSet, scrollbarSet->GetScrollEnclosure(),
						 JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 100,100);
	assert( itsText != NULL );
	itsText->FitToEnclosure();
	itsText->TESetLeftMarginWidth(5);

	itsShowAtStartupCB->SetVisible(showStartupCB);
	itsShowAtStartupCB->SetState(showAtStartup);

	ListenTo(itsNextTipButton);
	ListenTo(itsCloseButton);
}
开发者ID:raorn,项目名称:jx_application_framework,代码行数:85,代码来源:JXTipOfTheDayDialog.cpp


注:本文中的JXStaticText::SetBorderWidth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。