Hello, Rooters
I’m trying to make a small GUI using TControlBar & Addbutton function.
If I want to put a linux commnd result (let’s say, something like “date”)
on a canvas, what should I do? For example, In root tutorial, there is demos.C in which first button(“Help on Demos”) makes a canvas showing some infos.
I want to show the result of “date” command on it.
After some struggling, I came up with something like below without success(date.C : this is the content of a macro to be run when I click a button named “date”):
{
char date = gSystem->Exec(“date”);
date = new TPaveText(.1,.8,.9,.97)
date->Addtext(??);
date->SetTextFont(32);
date->SetTextColor(4);
date->SetFillColor(34);
date->Draw();
}
Could you help me to fix this one?
Another small question, How can I change the size of the buttons of TControBar frame?
bar = new TControlBar(“vertical”, “Date GUI example”, 400,400);
In this example I found changing 400 didn’t help.
Could anyone have any idea how to solve these problems?
Thank you!
Regards,
Jin