Browser doesnt Justify properly

Moderator: Rathinagiri

Post Reply
User avatar
nspmadero
Posts: 6
Joined: Wed Jul 30, 2008 7:45 pm

Browser doesnt Justify properly

Post by nspmadero » Thu Jun 25, 2009 8:41 pm

I want to show 3 columns, 2 numbers and 1 string
The code goes like this:

Code: Select all

@ 110, 3 BROWSE Explora_Dist WIDTH 405 HEIGHT 315 ;
  HEADERS { "No.Dist.", "Nombre", "No.Patro"} WIDTHS {60, 245, 60} ;
  WORKAREA Dist FIELDS {"Dist->NoDist" , "Dist->Nombre" , "Dist->NoPatro"} VALUE 1 ;
  FONT "Arial" SIZE 9 ;
  JUSTIFY { BROWSE_JTFY_RIGHT, BROWSE_JTFY_LEFT, BROWSE_JTFY_RIGHT } ;
  ON CHANGE { || DistMuestra () }
Notice the 1st number, i want it justified to the right, but it always appears to the left.

User avatar
Roberto Lopez
HMG Founder
Posts: 3902
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 137 times

Post by Roberto Lopez » Thu Jun 25, 2009 11:21 pm

nspmadero wrote:I want to show 3 columns, 2 numbers and 1 string
The code goes like this:

Code: Select all

@ 110, 3 BROWSE Explora_Dist WIDTH 405 HEIGHT 315 ;
  HEADERS { "No.Dist.", "Nombre", "No.Patro"} WIDTHS {60, 245, 60} ;
  WORKAREA Dist FIELDS {"Dist->NoDist" , "Dist->Nombre" , "Dist->NoPatro"} VALUE 1 ;
  FONT "Arial" SIZE 9 ;
  JUSTIFY { BROWSE_JTFY_RIGHT, BROWSE_JTFY_LEFT, BROWSE_JTFY_RIGHT } ;
  ON CHANGE { || DistMuestra () }
Notice the 1st number, i want it justified to the right, but it always appears to the left.

From HMG reference (Browse control):

Code: Select all

The leftmost column in a browse control must be left aligned. 
Browse inherits this limitation from ListView Windows control.

A 'dirty trick' to workaround this, is to create a 'dummy' first column with zero width.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5181
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 141 times
Been thanked: 131 times
Contact:

Post by Rathinagiri » Fri Jun 26, 2009 3:02 am

A 'dirty trick' to workaround this, is to create a 'dummy' first column with zero width.
I like this. :) Thanks Roberto.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
nspmadero
Posts: 6
Joined: Wed Jul 30, 2008 7:45 pm

Post by nspmadero » Fri Jun 26, 2009 4:43 am

Thanks for the tip :)

Post Reply