paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: AW: [paragui-users] SpinnerBox - Alignment....?!


From: Himmler Andreas /OI&T
Subject: AW: AW: [paragui-users] SpinnerBox - Alignment....?!
Date: Thu, 4 Jul 2002 14:55:28 +0200

Hi!

Ok. I've found the problem with the manual edit! If there are other chars
than '#' in the Mask the function atoi() cuts of the string at if this
character is reached (at PARAGUI_CALLBACK(PG_SpinnerBox::handle_editend) in
pgspinnerbox.cpp). 

In my case the value get lesser than MinValue and so it was resetted.... I
think this would also happen, if the string would be right-justified and not
filled up completely.... :-(

BTW I've got an idea to improve the SpinnerBox: SetInterval (for the + and -
Buttons) and changed the source as follows:
Perhaps somebody will find this useful an add it to the real sources (I have
no idea how CVS works.... :-( )

pgspinnerbox.h:

                class DECLSPEC PG_SpinnerBox : public PG_ThemeWidget, public
PG_EventObject {
                public:
                ...
added:  void SetInterval( int value ) {
added:          m_Interval = value;
added:          }
                ...
                private:
                        ...
added:          int m_Interval;
                        ...
                };

pgspinnerbox.cpp:

                PG_SpinnerBox::PG_SpinnerBox(....) {
                        ...
                        m_iMinValue = 0;
added:          m_iInterval = 1;
                        m_iMaxValue = 0;
                        ...             
                };
        
                bool PG_SpinnerBox::eventButtonClick(...) {
                        ...
changed:                if (m_iValue < m_iMaxValue ) {
                                m_iValue++;
to:                     if ( (m_iValue+m_iInterval) <= m_iMaxValue) {
                                m_iValue+=m_iInterval;
                        ...
changed:                if (m_iValue > m_iMinValue ) {
                                m_iValue--;
to:                     if ( (m_iValue-m_iInterval) >= m_iMinValue) {
                                m_iValue-=m_iInterval;
                        ...
                };
        



-----Ursprüngliche Nachricht-----
Von: Himmler Andreas /OI&T [mailto:address@hidden
Gesendet: Donnerstag, 4. Juli 2002 12:22
An: 'address@hidden'
Betreff: AW: AW: [paragui-users] SpinnerBox - Alignment....?!


>Nobody till now needed such a behaviour. Due to this it's simply not
>implemented. If you need it implement it. :))

:-O Ok, so I'm not THE programmer, so if you could help me with a tipp where
to begin it would be great... :-D

>>There is also another problem(?): If I enter a number manual and press
>> [Enter] the Box is resetted to the MinValue.....????

>Sure.
>Thats the reason for min and max values. Adjust them to your needs and
>everythings fine.

Mmhh... I've thought this commands are only to set the limits.... And: Why
it's possible to change the value by keyboard if the entered numbers aren't
took over (even if I don't press [Enter])....???!?

Bye,


Himmler Andreas


_______________________________________________
paragui-users mailing list
address@hidden
http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]