IonicWind Software

IWBasic for Linux => General IWLP Discussion => Topic started by: Allan on September 25, 2008, 10:59:25 PM

Title: Labels not ligning up in display
Post by: Allan on September 25, 2008, 10:59:25 PM
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


Title: Re: Labels not ligning up in display
Post by: Duffer on September 26, 2008, 09:49:21 AM
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.
Title: Re: Labels not ligning up in display
Post by: Allan on September 30, 2008, 12:37:37 AM
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

Title: Re: Labels not ligning up in display
Post by: Armando Rivera on September 30, 2008, 07:10:24 AM
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.
Title: Re: Labels not ligning up in display
Post by: Allan on September 30, 2008, 03:23:06 PM
Thanks for finding it up for me AIR.

Will use your code on the program.

Allan