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 »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Browser doesnt Justify properly

Post by Roberto Lopez »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Browser doesnt Justify properly

Post by Rathinagiri »

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

Re: Browser doesnt Justify properly

Post by nspmadero »

Thanks for the tip :)
Post Reply