Search found 25 matches

by Gukalov
12 Jul 2020 20:42
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 2443

Re: Loading a bmp and jpg to a dialog

Don't forget: class bitmap : bitmap class image : image You can create a bitmap (image) from a file and from any other... From everything you need to create))) And edit it as you want to edit... Good luck))) P.S. imageControl, by the way, works perferctly with VPI picture (without all "onPaint"): in...
by Gukalov
10 Jul 2020 18:53
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 2443

Re: Loading a bmp and jpg to a dialog

Open dialog constructor. In window "Controls" click key symbol. Click in the dialog area. In appeared list choose "imageControl". O'k button. "imageControl_ctl" will appear - rename as you want, replace as you want, resize as you want......... (all needed packages added automatically) Add "onShow" e...
by Gukalov
9 Jul 2020 12:41
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 2443

Re: Loading a bmp and jpg to a dialog

Hi.
Just to draw a picture from a file?
Using ImageControl is the simplest way, I guess.

Code: Select all

    setImageFile : (string FileName).     % @short Loads the control image from the specified file.
by Gukalov
26 Apr 2019 15:23
Forum: Visual Prolog
Topic: Color background of standard control
Replies: 3
Views: 2464

Re: Color background of standard control

Hi everybody.
In the similar situation I stupidly used imageControl (instead of staticTextControl)
with the set of image files to change the colors and inscriptions (ImageControl:setImageFile(FileName)).
by Gukalov
5 Jan 2019 9:44
Forum: Visual Prolog
Topic: Send to Background-Bring to Top
Replies: 17
Views: 10036

Re: Send to Background-Bring to Top

Look at "window.i": predicates setActive : (). predicates bringToTop : (). predicates forceToTop : (). For working with vpi there are: predicates tryGetVpiWindow : () -> vpiDomains::windowHandle VpiWindowHandle determ. predicates getVpiWindow : () -> vpiDomains::windowHandle VpiWindowHandle.
by Gukalov
16 Aug 2018 12:34
Forum: Visual Prolog
Topic: ListviewControl compilation 32bit vs 64 bit, VP8
Replies: 7
Views: 7180

Re: ListviewControl compilation 32bit vs 64 bit, VP8

I would try withou varM... clauses sssToItemList(SSS, StartingIndex) = ItemList :- % CurrX = varM::new(StartingIndex), ItemList = [ Item || list::memberIndex_nd(SS, Index, SSS), ItemID = uncheckedConvert(listViewControl::itemID, Index + StartingIndex /*+0*/), % <== e504 error here on 64bit compilati...
by Gukalov
26 Jul 2018 13:11
Forum: Visual Prolog
Topic: Edit pdf document
Replies: 5
Views: 6919

Re: Edit pdf document

Harrison Pratt wrote:
26 Jul 2018 12:57
Do you mean add text from a VIP application?
- Yes, exactly. It need to sign a lot of scans, and I'm too lazy to do it manually)))
by Gukalov
26 Jul 2018 12:16
Forum: Visual Prolog
Topic: Edit pdf document
Replies: 5
Views: 6919

Edit pdf document

Hi)))
How to add simple text label to pdf document?
by Gukalov
3 Aug 2017 16:11
Forum: Visual Prolog
Topic: Difference between "in" and isMember/2 ?
Replies: 4
Views: 2725

Hi. "in" can be used instead of list::getMember_nd/1 and etc... implement main open core, console clauses run() :- List = [ 1, 2, 3, 4, 5 ], foreach X in List do write(X, " ") end foreach, nl, nl, foreach Y in setM_redBlack::new(List) do write(Y, " ") end foreach, write("\n.............................
by Gukalov
27 May 2017 20:44
Forum: Visual Prolog
Topic: Delete a group of text files
Replies: 4
Views: 3073

Code: Select all

directory::forAllFiles(FullDirName, {(F) :- file::delete(F)}, "*.txt", false)
by Gukalov
7 Mar 2017 21:05
Forum: Visual Prolog
Topic: Visual Prolog : Edit Control : Check if string contains numbers
Replies: 16
Views: 8605

Harrison, what about "Ctrl+V"?!
Looks like your code doesn't check what user pastes with Ctrl+V.
And user ain't happy if pasting prohibitted at all.
Isn't it?
by Gukalov
7 Mar 2017 18:25
Forum: Visual Prolog
Topic: Visual Prolog : Edit Control : Check if string contains numbers
Replies: 16
Views: 8605

Simplier to delete spaces before checking:
if string:hasAlpha(string::replaceAll(Control:getText(), " ", "")) then

But to check if entering name is correct you need something more sirious than just letters&spaces)))
"A m o d Go kh ale" ?!)))
by Gukalov
7 Mar 2017 17:28
Forum: Visual Prolog
Topic: Visual Prolog : Edit Control : Check if string contains numbers
Replies: 16
Views: 8605

Ups)))
sorry
Just
if string:hasAlpha(Control:getText()) then
by Gukalov
7 Mar 2017 17:00
Forum: Visual Prolog
Topic: Visual Prolog : Edit Control : Check if string contains numbers
Replies: 16
Views: 8605

As you did before:
clauses
validateNumber(Control) =
if _ = string:hasAlpha(Control:getText()) then
control::contentsOk
else
control::contentsInvalid(Control, Control, string::format("%s must be ???", Control:getText()))
end if.
by Gukalov
7 Mar 2017 16:25
Forum: Visual Prolog
Topic: Visual Prolog : Edit Control : Check if string contains numbers
Replies: 16
Views: 8605

Re: Visual Prolog : Edit Control : Check if string contains numbers

Hi.
Amod Gokhale wrote: Is there example to validate if string contains only alphabets and message user if it contains numbers?
Class string

Code: Select all

predicates     hasAlpha : (string Source) determ.     % @short Succeds if #Source only contains alphabetic characters.
It's not enough?