emy
New Member
Hello
Posts: 45
|
Post by emy on Jan 19, 2021 5:05:46 GMT -5
Hello,
I have two bugs
- When program start, the only one combobox do not get the color "Buttonface". Color appears when mouse is on combobox, then it keeps the color.
- When I select icons at the top, a window appears and if move that window ( con 'Info' for exemple), it cancel the big number beside 'Metric'. When I close that window and move slide cursor then it's OK again.
I use the command "flush"
Maybe some one will have an idea.
I could not add attachment because of zip file too big
Thanks all of You.
|
|
|
Post by Rod on Jan 19, 2021 5:41:02 GMT -5
Color of ComboBox has been discussed recently. I think Windows has changed behaviour. The solution is to place a SCAN statement just after the window is opened.
If graphics are disappearing off screen after being covered by another window then you are not using FLUSH correctly. Draw the graphics and immediately issue the FLUSH command before WAIT or SCAN.
If this does not help then we need to see some of your code, extract the part where you draw and flush.
|
|
emy
New Member
Hello
Posts: 45
|
Post by emy on Jan 19, 2021 7:10:59 GMT -5
Thank You Rod I could make the program smaller, I remove all BMP files Here is the program JTMT.zip (14.44 KB)
|
|
|
Post by Brandon Parker on Jan 19, 2021 10:11:57 GMT -5
Here is a link to the ComboBox color issue. Simply put, it looks like an internal implementation difference between "Wait" and "Scan" in Liberty BASIC itself. ComboBox Color Discussion{:0) Brandon Parker
|
|
|
Post by Brandon Parker on Jan 19, 2021 10:39:27 GMT -5
The problem with the Metric value disappearing is one of Z-Order and window placement. The #main.stt1 StaticText height is running into the upper Y location of the TrackBar. Since the TrackBar is an API created control, it may/may not work well with the existing LB control Z-Order drawing. In this case, things do not work out well. When the TrackBar is being redrawn, it is drawn after the StaticText which makes it appear that the StaticText value is disappearing, but it is actually just "behind" the TrackBar.
You need to make an adjustment to the window layout such that the StaticText does not fall behind the TrackBar rectangle. To confirm this, I changed the 465 in the statement below to 405 and everything worked as expected although the value was obviously higher on the main window.
statictext #main.stt1, " ", 420, 465, 80, 48 'Résultat en [Nm]
I hope this helps point you in the correct direction...
{:0)
Brandon Parker
|
|
emy
New Member
Hello
Posts: 45
|
Post by emy on Jan 19, 2021 10:48:32 GMT -5
Thanks Brandon I make an adjustment in window layout as You advise and it works nice. Thanks Rod I put scan just after open, now color combobox is OK. JTMT.zip (14.55 KB) I make this application long time ago on Turbo Basic. It's a yarn count converter, and suggest what kind of knit can be done with a yarn count selected. Emy
|
|