Page 1 of 1

Menu tipo Ribbonbar - aprendendo fazendo...

Posted: Sun Jan 25, 2015 9:50 pm
by toya
Boa tarde colegas !!!

Para iniciar o meu aprendizado adotando o HMG, resolvi ir montando um similar Menu Ribbonbar...
Está indo bem, usando muito as funcionalidades do BosTaurus, mas em alguns pontos estou com dificuldades na solução.

No momento tento efetuar a centralização do texto das opções do menu na aba-folder...
Na figura teste_rbb_1.png, utilizei:

Code: Select all

   nAlingText := BT_TEXT_BOTTOM 
	BT_DrawText( hDC, nTextoRow + 2, aLeft[i], oMnu:aPrompts[i], "Ms Sans Serif", 06, { 0, 0, 255 }, { 255,0, 0 } , nTypeText, nAlingText )	// , nOrientation)
   //           1    2              3         4                 5                 6  7               8             9          10                  11   
Mas como desejo centralizar o texto na aba-folder, estou tentando utilizar:

Code: Select all

   nAlingText := BT_TEXT_BOTTOM + BT_TEXT_CENTER
	BT_DrawText( hDC, nTextoRow + 2, aLeft[i], oMnu:aPrompts[i], "Ms Sans Serif", 06, { 0, 0, 255 }, { 255,0, 0 } , nTypeText, nAlingText )	// , nOrientation)
   //           1    2              3         4                 5                 6  7               8             9          10                  11   
Ocorre que esta saindo conforme a imagem teste_rbb_2.png.

Sendo o correto ao meu ver deveria ser:
+------------+
| Cadastro |

Os colegas poderiam auxiliar-me na questão ?...

Re: Menu tipo Ribbonbar - aprendendo fazendo...

Posted: Mon Feb 02, 2015 7:51 pm
by EduardoLuis
Hi Toya:

I appologize not responding you till now.-
About your request.- Developing simil RibbonBar Menues is possible on HMG, you can see a sample i develope that was included on last HMG Version 3.40.-
Although it's possible, it requires too much hours if what you want is to have a RibbonBar that acts like one.-
Applying ribbonbars to HMG apps, means you must previously comple several steps:
1) Draw - old style - on a sheet of paper and with normal pencil, what screens and controls you want to include; as your app may have several screens, you must draw each one considering all what your cliente pretends to be included.-
2) Develope each basic ribbonbar, and then insert each graphic that refers to each control (f. examp. "Printer graphic for printer action).-
3) Create each label control for each graphic.-
4) Develope routine for each label.-
I suggest you to consider each screen with all it's controls must be lately a final .EXE.- If later you have to modify any of the apps contained on that screen, you don't need to recompile all the aplication.-
For example, i'm developping a system that use nearly 10 ribbonbar screen, this means i develope 10 independient .EXEs managged by a principal app.-
Again, it's not an easy job, i sometime you'll feel frustrated, but when you finish it, tested and works fine, you'll feel like climbing Himalaya.-
Be patient, and don't discard the first steep i have listed before: there is the solution.-
With regards. Eduardo

By the way: although some of our members speaks and writes in portuguese, please write in english.-
Eduardo

Re: Menu tipo Ribbonbar - aprendendo fazendo...

Posted: Tue Feb 03, 2015 5:36 pm
by Javier Tovar
+1