I have a script that works just fine, BUT it is always put in the middle of the screen and sometimes this is inconvenient. How can I make this a "Sticky" ie be able to move it out of the way? I've made various attempts at using action scripting to achieve same as the script but I cannot seem to get close.
I though an XDialog box would be the best move as I can use:
{position=remember=dialog_name}
{size=remember=dialog_name}
and UI_DLG_REMEMBERED_GET("dialog_name")
How is the best way to do this? or is there a simpler way of adding something to the xbasic script containing the UI_GET_LIST2() to get the "sticky" effect that I am after. I have several other scripts that I would like to be able to change to a "sticky" as well, but this one is very basic [pardon the Pun].
I though an XDialog box would be the best move as I can use:
{position=remember=dialog_name}
{size=remember=dialog_name}
and UI_DLG_REMEMBERED_GET("dialog_name")
How is the best way to do this? or is there a simpler way of adding something to the xbasic script containing the UI_GET_LIST2() to get the "sticky" effect that I am after. I have several other scripts that I would like to be able to change to a "sticky" as well, but this one is very basic [pardon the Pun].
Code:
tbl = table.current() DIM choice_list as c = <<%txt% Operator_code Reg Sub MSN Mode-S %txt% DIM choice as c = ui_get_list2("Select Field Name","",choice_list,2,.t.) dim MoveOper as c = "" dim MoveSub as c = "" dim MoveReg as c = "" dim MoveCall as c = "" dim MoveModeS as c = "" FOR each field_name in choice SELECT CASE field_name = "Operator_code" MoveOper = current(tbl.Operator_code) CASE field_name = "Sub" MoveSub = current(tbl.Sub) CASE field_name = "Reg" MoveReg = current(tbl.reg) CASE field_name = "MSN" MoveCall = current(tbl.MSN) case field_name = "Mode-S" MoveModeS = current(tbl.modes) END SELECT next tbl.fetch_prev() tbl.change_begin() FOR each field_name in choice SELECT CASE field_name = "Operator_code" tbl.Operator_code = MoveOper CASE field_name = "Sub" tbl.Sub = MoveSub CASE field_name = "Reg" IF isblank("tbl.old_id") THEN tbl.old_id = ut(MoveReg) ELSE tbl.old_id = UT(tbl.old_id)+","+ut(MoveReg) END IF CASE field_name = "MSN" tbl.MSN = MoveCall CASE field_name = "Mode-S" tbl.modes = MoveModeS END SELECT next tbl.change_end(.t.) tbl.fetch_next() tbl.change_begin() tbl.delete() tbl.change_end(.t.) topparent.refresh_layout()
Comment