March 28, 2024, 04:58:19 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Labels not ligning up in display

Started by Allan, September 25, 2008, 10:59:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Allan

I have been converting my Windows Emergence Address Book program over into the Linux OS.

I realise that not full functionality is available for some things like ListView and CONTROLCMD so I have a way to go to finish the conversion.

The one thing I am not understanding is the Static Controls above the Edit Boxes are not in the position expected.

I have opened up (spaced out) the Controls more thinking that it may help but it has not.

Attached is image and source in the zip.

What need I do to have the Labels align to the Left correctly?

Allan



Duffer

FWIW, I do not know enough about the Linux version to guess about the cause of the problem, but I do get the exact same results as shown in your screenshot.

Allan

I stripped the code down all the way back to just the WINDOW and controls on left side of the Window (NOT using Buttons).

I then spaced all the controls out and made them a better size and more room between them. This did not help lign up the labels.

So I guess the problem is not in my code.

Allan


Armando Rivera

September 30, 2008, 07:10:24 AM #3 Last Edit: September 30, 2008, 08:22:53 AM by Armando Rivera
It looks like the STATIC control is center-aligned by default.  For left alignment, the xalign property needs to be set to 0.0.

You can set this like so (has to be done for each STATIC, until the native alignment flags work):

First, declare the following:

declare cdecl extern g_object_set(oHnd as pointer,oProp as string,...)

Then for each static, do:

pControl=GetControlWidget(Main,STATIC_8)
g_object_set(pControl,"xalign",0.0,0)


pControl is a pointer, of course. 

Above, I used STATIC_8 (the "Number, Street" label) as an example.

The value passed to the xalign property must be a float.

HTH,

AIR.
"Programming is like Poetry. Sometimes the words just escape you..."
-me, to my manager.

http://www.recursivemedia.net

Allan

Thanks for finding it up for me AIR.

Will use your code on the program.

Allan