Jump to content

Content goes outside the scrollbox in ObjectGui


photo

Recommended Posts

Hello:

I create a GUIobject and a GUI with the same ui file. As the figure,  GUI works fine. But in ObjectGUI,  the content moves with scrollbar. However it goes outside the boundary.

How to fix this? Thanks in advance.

----------------------------

Unigine 2.7.2

VS2015 C++

---------------------------

	ObjectGuiPtr GUIobject = ObjectGui::create(24.0, 12.0);
	GUIobject->setScreenSize(520, 260);
	GUIobject->setBillboard(1);
	GUIobject->setWorldTransform(rotateX(90.0));
	GUIobject->setWorldPosition(pos + Vec3(0.0, 0.0, 12.0));
	GUIobject->release();

	ui = UserInterface::create(GUIobject->getGui(), ui_path);

	window = WidgetWindow::cast(ui->getWidget(ui->findWidget("window")));
    window->arrange();
	GUIobject->getGui()->addChild(window->getWidget(), Gui::ALIGN_TOP);

Here is part of ui file.

		<tab>
			<text>D</text>
			<scrollbox name="scrollbox" export="0" space="8" align="expand" border="1" henabled="1" venabled ="1">
			<vbox export="0" space="8">
			<label name="label_specification"><text rich="1"> <table color="#888888" space="4"><center>
			  <tr>
				<td>Firstname</td>
				<td>Lastname</td>
				<td>Age</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			  
			  <tr>
				<td>Jill</td>
				<td>Smith</td>
				<td>50</td>
			  </tr>
			  <tr>
				<td>Eve</td>
				<td>Jackson</td>
				<td>94</td>
			  </tr>
			</center></table> 
			</text></label> </vbox>
			</scrollbox>
		</tab>

 

gui_issue.thumb.jpg.5a52ea107e26cb2aeb4bbf115ab471bc.jpg

Link to comment
×
×
  • Create New...