FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Two METRO questions about MENU and saving button-pos
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Two METRO questions about MENU and saving button-pos

Posted: Thu Feb 26, 2015 12:35 PM
Hello,

I started to convert a old app from a customer of mine.
He likes to get a METRO-style-look

I have 2 questions

1. how to save the button-pos of a moved button ?
2. using MENU, how to switch back to mainscreen ?

The MAIN-screen
There are 12 month shown in the middle.
These are the buttons he is working with every day.
I want to move the current month to the 1. position of the middle section and save it.
From the right section I will open SUB-MENUS



The SUB-menu
Again 12 month, a new button-position ( moved ) must be saved



best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: Two METRO questions

Posted: Thu Feb 26, 2015 12:39 PM

Espero te sirva de ayuda

viewtopic.php?f=17t=28974#p163051

Hope you serve help

&

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: Two METRO questions

Posted: Thu Feb 26, 2015 12:55 PM
Cristobal,

thank You very much for the info.

For the 1. question ( back to main-screen ), I found the solution in /samples/touch.prg
Still I have to save the button-position.

I must do it very simple, because these people are not computer-experts.
The handling must be as easy as possible.
As well, I don't want to spent to much work on it.
A solution of my two questions will be enaugh.

best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Two METRO questions about MENU and saving button-pos

Posted: Fri Feb 27, 2015 02:18 AM

Using MENU, how to switch back to mainscreen ?

Just click anywhere in the blank area on the top.

How to save the button-pos of a moved button ?

You may save oBtn:nTop and oBtn:nLeft.
Your question is how do we know when to save. We have to save after execution of MetroPanel's MoveBtn() method.

We need to make this modification to the metropanel class.

  1. Add new DATA bOnMoveBtn
  2. At the end of METHOD MoveTo() add these lines

if ::bOnMoveBtn != nil
Eval( ::bOnMoveBtn, Self, oDragBtn )
endif

3) Your function :

func OnMoveBtn( oMetro, oDragBtn )

if oDragBtn == oMyBtn
// save oMyBtn:nTop, oMyBtn:nLeft
endif

return nil

Because you need this urgently, I suggest you may attempt this modification
We may include in the next release.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion