Discussions related to Visual Prolog
Vitaly Markov
Active Member
Posts: 40
Joined: 30 Nov 2003 0:01

The control is shift to right on the ToolBar of application

Unread post 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.
Image
Localization of ListButton control in editor of ToolBar is correct.
Harrison Pratt
VIP Member
Posts: 439
Joined: 5 Nov 2000 0:01

Re: The control is shift to right on the ToolBar of application

Unread post 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:

Code: Select all

open core
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)
Vitaly Markov
Active Member
Posts: 40
Joined: 30 Nov 2003 0:01

Re: The control is shift to right on the ToolBar of application

Unread post 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.
Vitaly Markov
Active Member
Posts: 40
Joined: 30 Nov 2003 0:01

Re: The control is shift to right on the ToolBar of application

Unread post 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
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Re: The control is shift to right on the ToolBar of application

Unread post 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.
Regards Thomas Linder Puls
PDC
Vitaly Markov
Active Member
Posts: 40
Joined: 30 Nov 2003 0:01

Re: The control is shift to right on the ToolBar of application

Unread post by Vitaly Markov »

Yes, code is harmless.
Thanks.
Post Reply