XmTextPosToXY(3X)XmTextPosToXY(3X)NAME
XmTextPosToXY - A Text function that accesses the x and y position of a character position
SYNOPSIS
#include <Xm/Text.h>
Boolean XmTextPosToXY (widget, position, x, y)
Widget widget;
XmTextPosition position;
Position *x;
Position *y;
DESCRIPTION
XmTextPosToXY accesses the x and y position, relative to the upper left corner of the Text widget, of a given character position in the
text buffer. Specifies the Text widget ID Specifies the character position in the text for which the x and y position is accessed. This
is an integer number of characters from the beginning of the buffer. The first character position is 0. Specifies the pointer in which
the x position, relative to the upper left corner of the widget, is returned. This value is meaningful only if the function returns True.
Specifies the pointer in which the y position, relative to the upper left corner of the widget, is returned. This value is meaningful only
if the function returns True.
For a complete definition of Text and its associated resources, see XmText(3X).
RETURN VALUE
This function returns True if the character position is displayed in the Text widget; otherwise, it returns False, and no x or y value is
returned.
SEE ALSO XmText(3X)XmTextPosToXY(3X)
Check Out this Related Man Page
XmTextFieldPosToXY(library call) XmTextFieldPosToXY(library call)
NAME
XmTextFieldPosToXY -- A TextField function that accesses the x and y position of a character position
SYNOPSIS
#include <Xm/TextF.h>
Boolean XmTextFieldPosToXY(
Widget widget,
XmTextPosition position,
Position *x,
Position *y);
DESCRIPTION
XmTextFieldPosToXY accesses the x and y position, relative to the upper left corner of the TextField widget, of a given character position
in the text buffer.
widget Specifies the TextField widget ID
position Specifies the character position in the text for which the x and y position is accessed. This is an integer number of characters
from the beginning of the buffer. The first character position is 0.
x Specifies the pointer in which the x position is returned. The returned position is the distance from the left side of the wid-
get to the left border of the character. This value is meaningful only if the function returns True.
y Specifies the pointer in which the y position is returned. The returned position is the distance from the top of the widget to
the character's baseline. This value is meaningful only if the function returns True.
For a complete definition of TextField and its associated resources, see XmTextField(3).
RETURN
This function returns True if the character position is displayed in the TextField widget; otherwise, it returns False, and no x or y value
is returned.
RELATED XmTextField(3).
XmTextFieldPosToXY(library call)
Hi All
I want to replace a character in a line, but position will be different form one iteration to another.
So i m keeping the position i a variable.
I am trying with following code
pos=3
echo "Hello World, Good Morning" | sed 's/\(.\{$pos\}\)./\1Y/'
But its not working, Can you... (2 Replies)
Hi
I'm trying to use awk in a file(test123.dat).
My requirement is to to check for the 65th position, if the 65th position is a space then replace the 65th position by the number 9.
This is the code that i used:
awk '{substr($0,65,1) ~ / / }{sub(substr($0,65,1),"9")}{print}' test123.dat
... (7 Replies)
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
Hello
I want to add some value at the specific position.
My file has data like
Hello
Welcome to UNIX Forums
Need Assistance
I want to add some value at the end but at same character position for all lines.
I want my output file to have data like :
Here '_' represents blanks.... (3 Replies)
Hello. I'm trying to delete one character in determinate position.
Example:
qwEtsdf123Ecv34
<delete character in positión 3>
Result:
qwtsdf123Ecv34
Plase, help me.
Thanks (4 Replies)
hi ,
i am having a file
Full_ARTMAS_20110510152425.xml in my local directory. i wanted to extract the character at the 35143546 th position at line 1 of this file.Can any body help me how to do it???
regards
Anjali (2 Replies)
i want to find the position of a character in a line , the first position, last, 5th occurence position , i ve tried grep -n , and expr index but they dont fit the bill. Please let me know if there is any other alternative (2 Replies)
Hi,
i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command.
thanks in advance,
Sara (9 Replies)
Hi, im still new in unix.
i want to ask how to delete character on specific position in line, lets say i want to remove 5 character from position 1000, so characters from position 1000-1005 will be deleted.
i found this sed command can delete 4 characters from position 10, but i dont know if... (7 Replies)
Hi All,
I wanted a sed/awk command to add a value/character on a particular position without disturbing the position of other characters.
I have file a.txt
OL 10031 Day Black Midi Good Value P01 P07
OL 10031 Day Black Short Good Value P01 P07
I want to get the output as... (2 Replies)
I am on AIX.
I need to use AWK to split the source file based on a character at a certain position.
Position 75 with a value of 'R' should go in one output file and the rest should go in another file.
I need proper names for the output files.
Source FileName : abc_xyz_pqr_a_1_yymmdd... (15 Replies)