olikraus / m2tklib

Automatically exported from code.google.com/p/m2tklib
Other
49 stars 11 forks source link

M2_ALIGN issue #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create two labels
2. Put in a list
3. Put in a HList
4. Allign that HList
5. Create other two labels
6. Put in another list
7. Put in another HList
8. Allign that HList too
9. Put the alligned Hlist in a list
10. Put the list in a HList

All the items will appear in the center of the screen.
I want to create lines of information that are centered on the screen.
But all i obtain is that everything is combined in the center of the screen.

Es.
I want to obtain

  Text Text
 Text2 Text2
   BlaBlaB

I obtain

   BlaBlaB

Code i'm using:

//PRIMA LINEA
M2_LABELFN(home_status, NULL, home_status_fn);
M2_LABELFN(home_time, NULL, home_time_fn);
M2_LIST(home_prima_list) = {&home_status, &home_time};
M2_HLIST(home_prima_hlist, NULL, home_prima_list);

//SyyONDA LINEA
M2_LABEL(home_label_temp, NULL, "T:");
M2_LABELFN(home_temp, NULL, home_temp_fn);
M2_LABEL(home_label_zz, NULL, " zz: ");
M2_LABELFN(home_zz, NULL, home_zz_fn);
M2_LIST(home_syyonda_list) = {&home_label_temp, &home_temp, &home_label_zz, 
&home_zz};
M2_HLIST(home_syyonda_hlist, NULL, home_syyonda_list);
M2_ALIGN(home_syyonda_ahlist,"-1W64H64", &home_syyonda_hlist);

//TERZA LINEA
M2_LABEL(home_label_xx, NULL, "xx: ");
M2_LABELFN(home_xx, NULL, home_xx_fn);
M2_LABEL(home_label_yy, NULL, " yy: ");
M2_LABELFN(home_yy, NULL, home_yy_fn);
M2_LIST(home_terza_list) = {&home_label_xx, &home_xx, &home_label_yy, &home_yy};
M2_HLIST(home_terza_hlist, NULL, home_terza_list);
M2_ALIGN(home_terza_ahlist,"-1W64H64", &home_terza_hlist);

//QUARTA LINEA
M2_BUTTON(home_btn_status, "f2", "Status", home_btn_status_fn);
M2_BUTTON(home_btn_opzioni, "f2", "Opzioni", home_btn_opzioni_fn);
M2_LIST(home_quarta_list) = {&home_btn_status, &home_btn_opzioni};
M2_HLIST(home_quarta_hlist, NULL, home_quarta_list);
M2_ALIGN(home_quarta_ahlist,"-1W64H64", &home_quarta_hlist);

//DEFINIZIONE FINALE
M2_LIST(home_list) = {&home_prima_hlist, &home_syyonda_ahlist, 
&home_terza_ahlist, &home_quarta_ahlist};
M2_VLIST(home_vlist, NULL, home_list);
M2_ALIGN(home_avlist,"-1|1W64H64", &home_vlist);

Original issue reported on code.google.com by carde...@gmail.com on 4 Feb 2015 at 10:50

GoogleCodeExporter commented 9 years ago
So the actual problem is, that some text is missing?

Original comment by olikr...@gmail.com on 5 Feb 2015 at 5:39

GoogleCodeExporter commented 9 years ago
Everything is missing. It look like all the elements are on the center of the 
screen one over the other. Try my code and look what happen. 

Original comment by carde...@gmail.com on 5 Feb 2015 at 9:40