Page 1 of 1
The control is shift to right on the ToolBar of application
Posted: 23 Dec 2019 16:31
by Vitaly Markov
Why it is that ListButton control is shift to right on the ToolBar of application. Why is it?
Visual Prolog 802 CE.
Localization of ListButton control in editor of ToolBar is correct.
Re: The control is shift to right on the ToolBar of application
Posted: 23 Dec 2019 22:55
by Harrison Pratt
It behaves as expected for me using VP 802. Did you check the automatically generated controlList for spurious (? invisible) items?
I have a tiny suggestion for PDC: The automatically generated code for
ProjectToolbar.pro needs the following:
so that the following code does not need manual inserted class specification for
b_true when inserting a listbutton in the generated controlList:
Code: Select all
% tb_lbut(id_tb_1_2, 80, [], b_true, 0)
tb_lbut(id_tb_1_2, 80, [], core::b_true, 0)
Re: The control is shift to right on the ToolBar of application
Posted: 24 Dec 2019 18:54
by Vitaly Markov
ControlList do not contains spurious (invisible) items.
I think the problem is localized in VpiToolBar.pro on
my computer and fixed in my project.
The detailed description and screen-shots is on forum
http://www.hardforum.ru/t135856/
Thanks.
Re: The control is shift to right on the ToolBar of application
Posted: 26 Jan 2020 14:17
by Vitaly Markov
It is the tablet to valid localize the listBox in toolBar in SDI-project (file vpiToolbar.pro):
Code: Select all
clauses
create_listcontrols(TbWin) :-
lbut(TbWin, Id, rct(L, T0, R, _), SList, Enabled, Pos),
T = T0 + 1,
B = T + toolbar_listbutton_height,
LBW = vpi::winCreateControl(wc_LBoxButton, rct(L, T, R, B), "", TbWin, [wsf_Visible], convert(ctlId, Id)),
vpi::lboxSuspend(LBW),
vpi::lboxAdd(LBW, -1, SList),
vpi::lboxSetSel(LBW, Pos, b_true),
vpi::lboxResume(LBW),
get_Flag(Enabled, FLAG),
vpi::winSetState(LBW, [FLAG]),
vpi::winMove(LBW,rct(L, T, R, B)), % <- it is tablet
fail.
Now the localization of listBox in toolBar is correct.
Pictures here
http://www.hardforum.ru/t135856/#post900490
Re: The control is shift to right on the ToolBar of application
Posted: 27 Jan 2020 15:43
by Thomas Linder Puls
I have not been able to reproduce the problem.
But the code you state seems harmless, and if it solves the problem then we will add it.
Re: The control is shift to right on the ToolBar of application
Posted: 27 Jan 2020 17:07
by Vitaly Markov
Yes, code is harmless.
Thanks.