右对齐按钮在框架中

时间:2015-11-12 09:23:03

标签: progress-4gl openedge

我们如何正确对齐Progress ABL框架中的按钮?

以下是我的代码的一部分:

DEFINE BUTTON make-btn LABEL "save". //left of the frame
DEFINE BUTTON cancel-btn LABEL "cancel". //right of the frame 

我需要同一行上的两个按钮。

1 个答案:

答案 0 :(得分:2)

One way is using the FRAME phrase and doing absolute positions. You can also use a more dynamic way (I've commented out an example). There's most likely several ways of doing this. Hope this version can get you started at least.

Check out FRAME and FORM statements in the documentation. You can find documentation for your version here. The ABL Reference is where you should start.

Links to documentation (Version 11.6) :

Example program:

DEFINE BUTTON make-btn   LABEL "save" .
DEFINE BUTTON cancel-btn LABEL "cancel" .

DEFINE VARIABLE value1 AS CHARACTER   NO-UNDO LABEL "Value1".
DEFINE VARIABLE value2 AS CHARACTER   NO-UNDO LABEL "Value2".
DEFINE VARIABLE value3 AS CHARACTER   NO-UNDO LABEL "Value3".



DEFINE FRAME frame-buttons
    value1 SKIP
    value2 SKIP
    value3 SKIP
    make-btn   AT COLUMN 4  ROW 8 
    cancel-btn AT COLUMN 40 ROW 8
    WITH 2 COLUMNS TITLE "Test" SIZE 50 BY 10.

/*
/*Dynamic positioning example */
cancel-btn:COLUMN = FRAME frame-buttons:WIDTH - 10.
*/
VIEW FRAME frame-buttons .

ENABLE ALL WITH FRAME frame-buttons.

UPDATE value1 WITH FRAME frame-buttons.