Jump to content

Recommended Posts

Posted

Hi I am new at Ultra App Kit. I am trying to set the background color of a textarea widget and it doesn't seem to be working.

 

	// Create output pannel
	auto panel = CreatePanel(0, menu_sz.y, sz.x, sz.y - menu_sz.y, ui->root);
	auto panel_sz = panel->GetSize();
	panel->SetColor(0, 0.08, 0.002, 1);
	panel->SetLayout(1, 1, 1, 1);

	// Create text area
	auto text_area = CreateTextArea(10, 10, panel_sz.x - 20, panel_sz.y - 20, panel, TEXTAREA_WORDWRAP);
	text_area->SetColor(0, 1, 0);
	text_area->SetLayout(1, 1, 1, 1);

image.thumb.png.05805e31219b65dd94e4ddd8f26f57d7.png

As you can see it is as if it ignores the text_area->SetColor( ) function all together.

Please what am I doing wrong?

 

[EDIT]

I figured out what I was doing wrong. You must set the color for the WIDGETCOLOR_SUNKEN to change the background.

text_area->SetColor(0, 1, 0, 1, WIDGETCOLOR_SUNKEN);

You can close this post or leave it up if it may help others.

  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...