by 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