|
|
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Have the PictureButton ?
Have the PictureButton ? [message #12557] |
Fri, 09 November 2007 05:36 |
LiniX
Messages: 7 Registered: October 2007 Location: Thailand
|
Promising Member |
|
|
Hi,
I want to use Picture like the Button.
I want to use GreenPhone and RedPhone to application.
How to use it ?
Thank You
Watchara Kangkun
|
|
|
|
|
Re: Have the PictureButton ? [message #12617 is a reply to message #12612] |
Sat, 10 November 2007 23:50 |
|
FlatButton is a class used in Clock and Calendar. Now (after recent DateTimeCtrl refactoring) it should be rather named TransparentButton. Anyway I could make it more universal (it wasn't created as next standard ctrl in mind). Just say what you really need and I'll try to extend it.
Now you can use it for example in this way:
FlatButton btn;
btn.SetImage(Img::LeftArrow);
btn.SetLeft() //when button is pushed the image will be scrolled left (to natural move imitation - it'd look stupid if right arrow were scrolled left)
btn <<= THISBACK(MyAction);
Add(btn.LeftPos(0, 40).TopPos(0, 19));
There is also a FlatSpin which is the combination of two FlatButtons ant text displayed between them. For example:
FlatSpin btn;
btn.SetText("Click me");
btn <<= THISBACK(MyActionOnTextClick)
btn.SetCallbacks(THISBACK(MyActionOnLeftClick), THISBACK(MyActionOnRightClick));
One can also use LineCtrl which is for example used in Clock control as minute and hour setter (it's located at left and right side of clock).
All this controls were created for DropTime/DropDate. If anyone wants to use them please give me a sign. I will document them better / make more universal.
[Updated on: Sat, 10 November 2007 23:55] Report message to a moderator
|
|
|
|
|
|
Re: Have the PictureButton ? [message #12639 is a reply to message #12634] |
Mon, 12 November 2007 00:19 |
Mindtraveller
Messages: 917 Registered: August 2007 Location: Russia, Moscow rgn.
|
Experienced Contributor |
|
|
I may contribute docs structure as I see it, gradually adding actual texts to the articles proposed. It`s how I suggested to do.
For now, presence and content of structure proposed is still under discussion, so it`s unknown what to contribute for now, actually.
That`s why I try to determine what kind of manual should be - ASAP.
[Updated on: Mon, 12 November 2007 00:22] Report message to a moderator
|
|
|
|
|
|
Re: Have the PictureButton ? [message #12737 is a reply to message #12735] |
Wed, 14 November 2007 16:18 |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Button::Style flatstyle;
void SetFlatStyle(Button &btn)
{
flatstyle = btn.StyleNormal();
flatstyle.look[0] = SColorFace();
flatstyle.look[1] = SColorFace();
flatstyle.look[2] = SColorFace();
flatstyle.look[3] = SColorFace();
btn.SetStyle(flatstyle);
}
Or you can replace SColorFace with an Image to draw some sort of border. See the Image B in CtrlLib/Ctrls.iml.
And yes, Button option should have a Label and IMO be either a variant of Option or Pusher. It's a bit useless at the mo.
[Updated on: Wed, 14 November 2007 16:19] Report message to a moderator
|
|
|
|
|
Re: Have the PictureButton ? [message #12751 is a reply to message #12743] |
Wed, 14 November 2007 19:24 |
cbpporter
Messages: 1401 Registered: September 2007
|
Ultimate Contributor |
|
|
That worked great. To bad It's just a hunch, but I won't find any documentation and chameleon and those magic IDs. Too bad you can't use it on ButtonOption...
|
|
|
Goto Forum:
Current Time: Mon May 06 05:46:51 CEST 2024
Total time taken to generate the page: 0.02753 seconds
|
|
|