xProgrammer - help please

xProgrammer - help please

Postby MGA » Fri Feb 26, 2010 9:41 pm

xProgrammer - help-me please!

@ 10,10 @ var get ooget nVal picture "@ E 999,999.99" RIGHT <--- RIGHT is possible??

:(
ubiratanmga@gmail.com

FWH18.02
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1234
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: xProgrammer - help please

Postby Antonio Linares » Fri Feb 26, 2010 11:49 pm

SGS,

It is not implemented yet in FiveLinux.

If you review FiveLinux.ch you will see that such clause is not implemented yet.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41289
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xProgrammer - help please

Postby MGA » Sat Feb 27, 2010 11:16 am

thanks
ubiratanmga@gmail.com

FWH18.02
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1234
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: xProgrammer - help please

Postby xProgrammer » Sun Feb 28, 2010 3:37 am

Hi SGS

Just at the moment I am stranded away from any FiveWin documentation so I am not certain what the RIGHT clause is for. My guess is that it is for aligning the contents of the FiveWin GET within the entry on a dialog? And you want the same behaviour for a GTKEntry in a FiveLinux dialog?

The way FiveLinux works (from memory) is that it basically intercepts keystrokes from the GTKEntry, uses that keystroke to update its own buffer, and then writes the contents of its buffer (in it entirety) to the GTKEntry.

One less than perfect way would be to modify that code so that the buffer is always the same length (presumably using PadL) but that will not give you the level of control you really want as it won't be directly aligning the text in the GTKEntry and so the results will be affected by the width of the string (variable due to variable character widths) and the width of the GTKEntry.

I haven't tried to control text alignment within a GTKEntry but I have done so successfully for a SAY (GTKLabel). When I get somewhere I can look out the code I did that with I will post it. I am not promising that you can do the same with a GTKEntry as I would have to look at what GTK object this alignment code related to and whether the GTKEntry class inherits from that class or, if it is through an interface, implements that interface.

I do recall that alignment was controlled by two floats, one for the x-alignment, the other for the y-alignment. I know I discussed this issue in part on a bit I wrote for the FiveLinux section of the FiveTechSoft wiki.

Good luck. Let me know if I have understood what you want correctly or not. Either way I will try to help more if I can be of help.

Regards
xProgrammer
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: xProgrammer - help please

Postby xProgrammer » Thu Mar 11, 2010 10:22 pm

The function I wrote will only work for labels because it calls a function in GTKMisc which is a parent of GTKLabel but not of GTKEntry.

However there is a similar function for a GTKEntry but it controls horizontal positioning only (which is what I think you want) avaible from GTK+ 2.4 on.

Code: Select all  Expand view
gtk_entry_set_alignment ()

void                gtk_entry_set_alignment             (GtkEntry *entry,
                                                         gfloat xalign);

Sets the alignment for the contents of the entry. This controls the horizontal positioning of the contents when the displayed text is shorter than the width of the entry.

entry :
    a GtkEntry

xalign :
    The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts

Since 2.4


I don't know if you are still pursuing this issue, or for that matter that I have understood exactly what you want, but if you do need some help implementing the above let me know

Regards
xProgrammer
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 2 guests