Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - steezware

#1
Language / KEYED File Indexes
February 06, 2025, 11:51:10 AM
Overview - which I'm sure everyone already knows...

* One can access a KEYED file by either key or index.
* One can fetch the index for a given record by key value doing...
    rcdIdx = IND(ch, KEY=keyValue$)
  ...and if one knows the index for a record its corresponding key value can be fetched...
    rcdKey$ = KEY(ch, IND=idxValue)

* When a record is updated, the index remains the same for a record, of course.
* If a record is removed and access to it is attempted by index an error 117 is raised.

With all that background, here is my question:

Do indexes get reused?  That is, when a record is deleted will the interpreter assign a previously-used index to a newly created record?
#2
Language / Re: RGB Listbox Colors
November 15, 2024, 03:14:12 PM
The 0 (zero) means to add a line to the end of the listbox.
Yes, $01$ is the listbox separator value.

...And - I am wanting to change the line background, not the foreground as in your sample.
#3
Language / Re: RGB Listbox Colors
November 15, 2024, 02:52:24 PM
I'm using a formatted listbox, but have tried with report view as well - with no luck.  What code did you use to test the background color setting I included in my original post? Please send a code snippet, James?

The attached image shows my listbox with '_GREEN' and '_BLUE' backgrounds working fine, then I attempt the '_COLOR' and it does not work.
#4
Language / Re: RGB Listbox Colors
November 15, 2024, 02:35:58 PM
I'm using a formatted listbox, but have tried with report view as well - with no luck.  What code did you use to test the background color setting I included in my original post? Please send a code snippet, James?

The attached image shows my listbox with '_GREEN' and '_BLUE' backgrounds working fine, then I attempt the '_COLOR' and it does not work.

#5
Language / RGB Listbox Colors
November 15, 2024, 01:54:31 PM
The documentation only refers to using the base 16 color for highlighting columns (or rows) in a listbox. Is it possible to use RGB colors?

I have tried '_COLOR'("RGB 180 200 220") and it does not work :(
#6
Nomads / Re: Left-Justify BUTTON Text
November 07, 2024, 12:55:01 PM
Got it - thx! :)

My client is on an older version of Pvx/Nomads and those options do not exist.

I checked the online manual and it does, indeed, mention font alignment under the Nomads section, but does not note when that feature was added to  PxPlus...

https://manual.pvxplus.com/PXPLUS/NOMADS%20Graphical%20Application/Creating%20Panel%20Controls/Button%20Control/Overview.htm

...and also in the online manual, for button properties there is 'BitmapPosition but nothing about a font-position property...

https://manual.pvxplus.com/PXPLUS/control_object_properties/button_properties.htm

Again, thank you to Martin and James and others for sharing this information with me.


#7
Nomads / Re: Left-Justify BUTTON Text
November 07, 2024, 09:40:13 AM
I now see I wasn't clear enough. Of course I can justify an IMAGE to the left, right, top or bottom of the button text, but my button has no image. And regardless of the image-justification setting the text is still centered on the button.

So, what I'm looking for is a way to left-justify text on a button that has no image.
#8
Nomads / Re: Left-Justify BUTTON Text
November 06, 2024, 07:39:12 PM
Yep, expression PAD(" Button Text", 2400) works great ... until you resize the panel, then Nomads (or someone) moves the text over from the left.

What I am trying to do is display button text left-justified, it's that simple.
#9
Nomads / Left-Justify BUTTON Text
November 06, 2024, 06:18:49 PM
Not sure if this is a Nomads or a Language issue, but...

Is there built-in Pvx logic or maybe a trick to have the 'text on a BUTTON control left-justified?
#10
Programming / Precision Anamoly when Dividing by 1
September 30, 2024, 11:46:26 AM
0100 BEGIN
0110 PRECISION 18
0120 FOR X=3.084820 TO 3.084829 STEP .000001
0130 PRINT X/1
0140 NEXT

What's up with certain divide-by-one values showing extra digits?

And this does not happen if  110 PRECISION 14
  or if I use PRC with 14    130 PRINT PRC(X/1, 14)

Seems like some places in the Pvx doc it mentions internal 18-digit precision and other places 14-digit - what's up with that?
#11
Language / Select on Tree with Checkboxes
August 22, 2024, 07:36:45 PM
I have a very simple treeview that only has a main node and one child, with only the children having checkbox selectors - defined as such...

LIST_BOX cTree, @(tmpCOL,tmpROW,tmpCOLS,tmpROWS), OPT="A,e,!,q,|", SEP=cTreeSep$

cTree'StateBitmaps$ = "!TreeUnselected|!TreeSelected|"
cTree'AutoState     = 2         ! toggle between states 1 (OFF) and 2 (ON)
cTree'CascadeState  = 0
cTree'Edit          = isFALSE
cTree'SepLoad$      = cTreeSep$
cTree'Sep$          = cTreeBranchSep$
cTree'Auto          = isTRUE
cTree'NotifyExpand  = isFALSE

Question: When I click on a child node, my UI class (LIKE *NOMADS) hits its appropriate method...

FUNCTION LOCAL ChangeLB_Tables()   TREE_SELECT

...but then when I click the SAME node it does not hit the on-select method. It's as if the automatic-signal-all-changes is not working, or one of my many settings above for the tree is not correct? I can programmatically change the  focus to another node to remove focus from the orginal node and then clicking on the original works, but that's not a fix.

Help? Thx!
#12
Thank you, Mike!
#13
Okay, putting this question/issue to rest. Arno was correct when he mentioned that making the multiline 2 rows high allowed for fetching 'SelectOffset, 'SelectLength and 'SelectText$.

So, I faked out my panel by making the multiline borderless and 2 lines high. I also messed around with making the font double-sized, which had an affect on fetching the offset and length.

Question to PxPlus is - why is it so difficult to fetch the offset and length of selected text in a multiline without work-arounds like making the control 2 rows high?
#14
Turns out that fetching 'SelectOffset and 'SelectLenght does work just fine, but the problem I am having turns out to be that the multiline control as it loses focus clears out the selection. So I need to figure out how to grab the offset/length when Nomads moves off the multiline before it loses focus?

I have tried 'Change and 'OnFocus and even thought maybe 'Validator or 'Formatter Nomads class functions would fire allow me to jump in and get the select offset/length, but no luck.

Or is there some multiline option/attribute that needs to be set to preserve the text selection when the multiline loses focus?
#15
In a multi-line control I want to grab the portion of the text that the user has selected.

For example...

       
  • a multiline contains "Hello World Canada"
  • the user double-taps on "World" and it shows as selected, highlighted
  • they then click another control on the panel - or simply tab off the multiline
  • in the logic that follows I attempt to grab the 'SelectOffset and 'SelectLength attributes ... but on leaving the multiline the users "World" selection is lost - no longer selected
  • so what I really get in SelectOffset is 12, the zero-based offset for the "d" in "World"
  • I need to get values 6 and 5
This is in Nomads, under *Nomads object control, and I do not have any OnFocus or OnSelect logic tied to the multiline control either in the Nomads panel definition or in my UI class (although I have tried using them and signal-all-changes and signal-on-exit and everything else I could think of).

I can, of course, do a ML'SelectOffset=6 and ML'SelectLength=5 and manually highlight "World", so that works...

...but how to I grab "World" when the user selects it and leaves the multiline control?

Help? Thx!