Write to xml file

Hello,
You need to check that the buffer you are trying to copy is available with something like this:

Code:
FIND tt1 WHERE your condition NO-LOCK NO-ERROR.
IF AVAILABLE tt1 THEN DO TRANSACTION:
    CREATE tt2.
    BUFFER-COPY tt1 to tt2.
END.

Best Regards,
 
Hello everyone,
How do I write in a fill-in with a line break in the key label?
The ABL button widget does not support multiple lines of text in the label.

Workaround solution is to use an image with the desired text.

Or, it might be possible to use win32 API to some manipulate the properties of the button to make it multiline.



Code:
  DEFINE VARIABLE hnlable AS HANDLE      NO-UNDO.
  DEFINE VARIABLE hnlableHWND AS INT      NO-UNDO.
 
  hnlable = FILL-IN-2:SIDE-LABEL-HANDLE .
 
  //hnlable:SCREEN-VALUE =  "OK~r~n" + "True".
 
  hnlableHWND =  hnlable:HWND.
 
  MESSAGE hnlableHWND.

Using the HWND handle, you might be able to use win32API to manipulate the label style to make it multi-line.

 
I've tried to make the fill-in side label multiline (word wrap) using the Win32 API programming, but I just can't get it to work.
Someone who is cleaver than me might be able to help.

However, I have managed to make a button's label to show multiple lines.

1757648360233.png
 
Hello, if you remember the keyboard code you gave me last time, which uses an XML file, the variable that uses the label, the fikeylabel, which uses a fill-in, I tried to change it with an editor, but the problem I found was that it didn't configure a line break in the button.
 
Hello, if you remember the keyboard code you gave me last time, which uses an XML file, the variable that uses the label, the fikeylabel, which uses a fill-in, I tried to change it with an editor, but the problem I found was that it didn't configure a line break in the button.
If you want line breaks in a button, Progress ABL doesn’t support this by default. To achieve it, you’ll need to use Win32 API programming to modify the button’s Style property.

I've included a static class object called "button.cls". It has a method called "MultilineLabel" - when you pass the button's HWND attribute and the character value of the button's label, it should change the style from single line to multi-line.

Try and work this into your code and see where you get to.
 

Attachments

Hello;
Thank you. If it's possible, how can I integrate this code into my procedure, which comes with other logic to display a button that uses an XML file?
Do I delete the code that uses XML and integrate the button.cls program?
More details, please.
Note: Of course, I'm using the keyboard code you sent me last time.
 
I have not tested this but is should work.
createLayout procedure
Code:
        CREATE BUTTON but1
            ASSIGN
              Y             = ypos
              X             = xpos
              LABEL         = keyboard.KeyCaption
              WIDTH-PIXELS  = keyboard.KeyWidth
              HEIGHT-PIXELS = keyboard.KeyHeight
              FRAME     = FRAME {&FRAME-NAME}:HANDLE
              NO-FOCUS  = TRUE
              TAB-STOP  = FALSE
              VISIBLE   = TRUE
              SENSITIVE = keyboard.SENSITIVE
              BGCOLOR   = (IF keyboard.KeyValue EQ "" THEN 12 ELSE ?)
              TRIGGERS:
                ON CHOOSE PERSISTENT RUN Keyboard-Process-Key IN THIS-PROCEDURE ( INPUT keyboard.KeyValue, INPUT keyboard.shiftKey, INPUT keyboard.ctrlKey, INPUT keyboard.altKey).
              END TRIGGERS.
       
         ASSIGN
            keyboard.WIDGET-HANDLE = but1:HANDLE.

/* Insert this code. - button.cls in your propath. */
if INDEX(keyboard.KeyCaption,"~r~n") GT 0 then
    button:MultilineLabel(input but1:HANDLE, input, keyboard.KeyCaption).
 
Last edited:
Thanks for your help but when I integrated the code it doesn't give me the hand to touch the button everything is grayed out.
here is an example
1758033152363.png
 
I don't think it's going to work.
For some reason I can't get the button to alter it's style to be multiline when then button's attribute has no-focus set to "true".
The no-focus is critical to how the virtual keyboard works.
 
Back
Top